/* ==========================================================================
   03-forms
   ========================================================================== */

#ok-callback-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0,0,0,0.5);
        justify-content: center;
        align-items: center;
        z-index: 99999;
        font-family: 'Inter', sans-serif;
    }
    #ok-callback-modal.active {
        display: flex;
    }
    #ok-callback-modal .ok-callback-form {
        background: #fff;
        padding: 40px;
        border-radius: 8px;
        width: 100%;
        max-width: 400px;
        position: relative;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        text-align: center;
    }
    #ok-callback-modal .ok-modal-close-x {
        position: absolute;
        top: 15px;
        right: 15px;
        background: #f0f0f0;
        border: none;
        width: 32px;
        height: 32px;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
        transition: 0.2s;
    }
    #ok-callback-modal .ok-modal-close-x:hover {
        background: #e86011;
        color: #fff;
    }
    #ok-callback-modal h3 {
        font-size: 24px;
        margin: 0 0 10px 0;
        color: #333;
    }
    #ok-callback-modal p {
        font-size: 14px;
        color: #666;
        margin: 0 0 20px 0;
    }
    #ok-callback-modal input {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
        outline: none;
        font-family: 'Inter', sans-serif;
    }
    #ok-callback-modal input:focus {
        border-color: #e86011;
    }
    #ok-callback-modal .ok-calc-btn {
        width: 100%;
        background: #e86011;
        color: #fff;
        border: 1px solid #e86011;
        padding: 12px 24px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 0;
        cursor: pointer;
        transition: all 0.3s;
        text-transform: uppercase;
        font-family: 'Inter', sans-serif;
    }
    #ok-callback-modal .ok-calc-btn:hover {
        background: transparent;
        color: #e86011;
    }
    #ok-callback-modal .ok-callback-message {
        margin-top: 15px;
        font-size: 14px;
    }

/* ==========================================================================
   Calculator
   ========================================================================== */

.ok-calc-wrapper {
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
                margin: 40px 0;
                box-sizing: border-box;
            }
            .ok-calc-wrapper *, .ok-calc-wrapper *::before, .ok-calc-wrapper *::after {
                box-sizing: inherit;
            }
            .ok-calc-container {
                background: #ffffff;
                border-radius: 0;
                overflow: hidden;
                position: relative;
                width: 100%; 
                max-width: 980px; 
                margin: 0 auto;
                padding: 0 20px;
            }
            .ok-calc-header {
                background: #ffffff;
                padding: 20px 0 10px 0;
                text-align: left;
            }
            .ok-calc-header h2 {
                margin: 0 0 15px;
                font-size: 20px;
                font-weight: 700;
                color: #222;
                display: inline-block;
                border-bottom: 1px solid #e85b12;
                padding-bottom: 8px;
            }
            .ok-calc-header p {
                margin: 0;
                color: #555;
                font-size: 16px;
                line-height: 1.5;
            }
            .ok-calc-body { padding: 20px 0; }
            .ok-calc-section {
                margin-bottom: 30px;
            }
            .ok-calc-section h3 {
                font-size: 16px;
                margin: 0 0 15px 0;
                color: #333;
                font-weight: 600;
            }
            .ok-calc-sliders {
                display: flex;
                gap: 20px;
            }
            .ok-calc-slider-group {
                flex: 1;
                background: transparent;
                padding: 20px;
                border-radius: 0 ;
            }
            .ok-calc-slider-group label {
                display: block;
                margin-bottom: 10px;
                font-weight: 500;
                color: #444;
            }
            .ok-calc-slider-group label span {
                color: #e86011;
                font-weight: 700;
                font-size: 16px;
            }
            .ok-calc-slider-group input[type="range"] {
                width: 100%; max-width: 980px;
                cursor: pointer;
                accent-color: #2db84b;
            }
            .ok-calc-options {
                display: flex;
                gap: 15px;
                flex-wrap: wrap;
            }
            .ok-calc-option {
                flex: 1;
                cursor: pointer;
                accent-color: #2db84b;
            }
            .ok-calc-option input {
                display: none;
            }
            .ok-calc-box {
                background: #fff;
                border: 1px solid #ddd;
                border-radius: 0 ;
                padding: 10px 15px;
                text-align: center;
                font-weight: 400;
                font-size: 14px;
                color: #333;
                transition: all 0.2s ease;
            }
            .ok-calc-option input:checked + .ok-calc-box {
                border-color: #e86011;
                background: #fff4ee;
                color: #e86011;
                box-shadow: 0 4px 10px rgba(232, 96, 17, 0.15);
            }
            .ok-calc-option:hover .ok-calc-box {
                border-color: #bbb;
            }
            .ok-calc-footer {
                background: transparent;
                padding: 30px 0;
                border-top: none;
                display: flex;
                align-items: center;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 20px;
            }
            .ok-calc-price-wrap {
                flex: 1;
                min-width: 250px;
            }
            .ok-calc-price-label {
                display: block;
                color: #666;
                font-size: 14px;
                margin-bottom: 5px;
            }
            .ok-calc-price {
                font-size: 28px;
                font-weight: 600;
                color: #e86011;
                line-height: 1;
                margin-bottom: 10px;
            }
            .ok-calc-disclaimer {
                font-size: 12px;
                color: #888;
                margin: 0;
                line-height: 1.4;
            }
            .ok-calc-btn {
                background: #e86011;
                color: #fff;
                border: 1px solid #e86011;
                padding: 10px 24px;
                font-size: 14px;
                font-weight: 500;
                border-radius: 0;
                cursor: pointer;
                transition: all 0.3s;
                text-transform: uppercase;
                letter-spacing: 0;
            }
            .ok-calc-btn:hover {
                background: #cc550f;
            }
            .ok-calc-btn:disabled {
                background: #ccc;
                cursor: not-allowed;
            }
            .ok-calc-btn-close {
                background: transparent;
                color: #888;
                border: none;
                padding: 10px 15px;
                font-size: 14px;
                cursor: pointer;
                accent-color: #2db84b;
                margin-top: 10px;
                text-decoration: underline;
            }
            .ok-calc-btn-close:hover {
                color: #333;
             background: transparent !important; }
            
            /* Form Overlay */

            .ok-modal-close-x {
                position: absolute;
                top: 0;
                right: 0;
                width: 40px;
                height: 40px;
                background: #e86011;
                color: #fff;
                border: none;
                font-size: 24px;
                line-height: 40px;
                text-align: center;
                cursor: pointer;
                transition: background 0.3s;
                padding: 0;
                /* Sharp corners */
                border-radius: 0;
            }
            .ok-modal-close-x:hover {
                background: #cc550f;
            }

            .ok-calc-form-overlay {
                position: fixed;
                top: 0; left: 0; width: 100vw; height: 100vh;
                background: rgba(255,255,255,0.95);
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 999999;
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
                backdrop-filter: blur(5px);
            }
            .ok-calc-form-overlay.active {
                opacity: 1;
                visibility: visible;
            }
            .ok-calc-form {
                position: relative;

                background: #fff;
                padding: 40px;
                border-radius: 0 ;
                box-shadow: 0 15px 40px rgba(0,0,0,0.15);
                width: 90%;
                max-width: 400px;
                text-align: center;
            }
            .ok-calc-form h3 {
                margin: 0 0 10px 0;
                font-size: 22px;
                color: #222;
            }
            .ok-calc-form p {
                color: #666;
                font-size: 14px;
                margin-bottom: 20px;
            }
            .ok-calc-form input[type="text"],
            .ok-calc-form input[type="tel"] {
                width: 100%; max-width: 980px;
                padding: 12px 15px;
                margin-bottom: 15px;
                border: 1px solid #ddd;
                border-radius: 0 ;
                font-size: 16px;
                box-sizing: border-box;
            }
            .ok-calc-form input:focus {
                border-color: #e86011;
                outline: none;
            }
            .ok-calc-form .ok-calc-btn {
                background: #e86011;
                color: #fff;
                border: 1px solid #e86011;
                padding: 10px 24px;
                font-size: 14px;
                font-weight: 500;
                border-radius: 0;
                cursor: pointer;
                transition: all 0.3s;
                text-transform: uppercase;
                letter-spacing: 0;
            }
            #calc-form-msg {
                margin-top: 15px;
                font-size: 14px;
                font-weight: 500;
            }
            #calc-form-msg.success { color: #007017; }
            #calc-form-msg.error { color: #d63638; }

            @media (max-width: 768px) {
                .ok-calc-container {
                    padding: 0 15px;
                }
                .ok-calc-sliders {
                    flex-direction: column;
                    gap: 20px;
                }
                .ok-calc-slider-group {
                    padding: 0;
                }
                .ok-calc-options {
                    flex-direction: row;
                    flex-wrap: wrap;
                    gap: 8px;
                }
                .ok-calc-option {
                    flex: 1 1 calc(50% - 4px); /* 2 items per row minimum */
                }
                .ok-calc-footer {
                    flex-direction: column;
                    text-align: center;
                    gap: 15px;
                }
                .ok-calc-btn {
                    width: 100%;
                    padding: 15px 20px;
                }
                .ok-calc-price {
                    font-size: 24px;
                }
            }

/* ==========================================================================
   Messengers
   ========================================================================== */

.ok-item { border: 1px solid #ccd0d4; padding: 15px; margin-bottom: 10px; background: #fff; position: relative; }
                .ok-item-header { cursor: move; font-weight: bold; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between;}
                .ok-remove-item { color: #dc3232; text-decoration: none; }
                .ok-remove-item:hover { color: #a00; }
                .icon-preview { max-width: 40px; max-height: 40px; display: block; margin-top: 5px; }

.ok-messengers-plugin {
                position: fixed;
                bottom: var(--ok-bottom-desktop, 20px);
                
                z-index: 99999;
                display: flex;
                flex-direction: column;
                align-items: center;
            }
            .ok-messengers-list {
                display: flex;
                flex-direction: column-reverse;
                gap: 15px;
                margin-bottom: 15px;
                opacity: 0;
                visibility: hidden;
                transform: translateY(20px);
                transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
                pointer-events: none;
            }
            .ok-messengers-plugin:not(.is-closed):hover .ok-messengers-list,
            .ok-messengers-plugin.is-open .ok-messengers-list {
                opacity: 1;
                visibility: visible;
                transform: translateY(0);
                pointer-events: auto;
            }
            .ok-messenger-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 50px;
                height: 50px;
                border-radius: 50%;
                color: #fff !important;
                text-decoration: none !important;
                box-shadow: 0 4px 15px rgba(0,0,0,0.15);
                transition: all 0.3s ease;
                position: relative;
                font-size: 24px; 
            }
            .ok-messenger-btn:hover {
                transform: scale(1.15) translateY(-5px);
                box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
                color: #fff !important;
            }
            .ok-messenger-btn img { width: 26px; height: 26px; object-fit: contain; }
            
            .ok-messenger-toggle {
                width: 60px;
                height: 60px;
                border-radius: 50%;
                background-color: var(--ok-main-color, #d35400);
                color: white;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                box-shadow: 0 5px 20px rgba(0,0,0,0.2);
                transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
                position: relative;
                z-index: 100;
                font-size: 28px;
            }
            .ok-messengers-plugin:not(.is-closed):hover .ok-messenger-toggle,
            .ok-messengers-plugin.is-open .ok-messenger-toggle {
                transform: scale(1.05);
                filter: brightness(0.9);
            }
            .ok-messenger-toggle i {
                transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
                position: absolute;
            }
            .ok-icon-chat { opacity: 1; transform: rotate(0) scale(1); }
            .ok-icon-close { opacity: 0; transform: rotate(-90deg) scale(0.5); }
            .ok-messengers-plugin:not(.is-closed):hover .ok-icon-chat,
            .ok-messengers-plugin.is-open .ok-icon-chat { opacity: 0; transform: rotate(90deg) scale(0.5); }
            .ok-messengers-plugin:not(.is-closed):hover .ok-icon-close,
            .ok-messengers-plugin.is-open .ok-icon-close { opacity: 1; transform: rotate(0) scale(1); }
            
            .ok-messenger-btn::before {
                content: attr(title);
                position: absolute;
                right: var(--ok-tooltip-right, auto);
                left: var(--ok-tooltip-left, auto);
                transform: var(--ok-tooltip-transform, translateX(10px));
                background: rgba(0,0,0,0.8);
                color: #fff;
                padding: 6px 12px;
                border-radius: 6px;
                font-size: 14px;
                white-space: nowrap;
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
                pointer-events: none;
                font-family: sans-serif;
            }
            .ok-messenger-btn:hover::before {
                opacity: 1;
                visibility: visible;
                transform: translateX(0);
            }
            #bitrix-chat-widget, .b24-widget-button-wrapper { display: none !important; }
            
            @media (max-width: 768px) {
                .ok-messengers-plugin {
                    bottom: var(--ok-bottom-mobile, 20px) !important;
                }
            }

/* ==========================================================================
   Potapov-dashboard
   ========================================================================== */

.potapov-wrap {
                max-width: 1000px;
                margin: 20px 20px 20px 0;
            }
            .potapov-header {
                background: #fff;
                padding: 30px;
                border-radius: 8px;
                box-shadow: 0 1px 3px rgba(0,0,0,0.1);
                margin-bottom: 25px;
            }
            .potapov-header h1 {
                margin-top: 0;
                font-size: 24px;
                font-weight: 600;
                color: #1d2327;
            }
            .potapov-header p {
                font-size: 15px;
                color: #50575e;
                margin-bottom: 0;
            }
            .potapov-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
                gap: 20px;
            }
            .potapov-card {
                background: #fff;
                padding: 25px;
                border-radius: 8px;
                box-shadow: 0 1px 3px rgba(0,0,0,0.1);
                position: relative;
            }
            .potapov-card-icon {
                font-size: 40px;
                width: 40px;
                height: 40px;
                color: #2271b1;
                margin-bottom: 15px;
            }
            .potapov-card h2 {
                margin: 0 0 15px 0;
                font-size: 18px;
                color: #1d2327;
            }
            .potapov-card p {
                font-size: 14px;
                color: #50575e;
                line-height: 1.5;
                margin-bottom: 20px;
            }
            .potapov-shortcode {
                background: #f0f0f1;
                padding: 10px;
                border-radius: 4px;
                margin-bottom: 20px;
                font-size: 14px;
            }
            .potapov-status {
                display: inline-block;
                background: #edfaef;
                color: #007017;
                padding: 5px 10px;
                border-radius: 4px;
                font-weight: 600;
                font-size: 13px;
                margin-top: 5px;
            }
            .potapov-footer {
                margin-top: 40px;
                text-align: center;
                color: #646970;
            }
            @media (max-width: 768px) {
                .potapov-grid {
                    grid-template-columns: 1fr;
                }
            }
