/* =========================================================================
   RESET & LAYOUT FIXES
   ========================================================================= */

footer,
.o_footer,
#footer,
footer.o_footer,
div[data-name="footer"] {
    display: none !important;
}

#wrapwrap {
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

#wrap,
#wrap.container,
#wrap.o_home_menu_background,
.o_portal_wrap,
.o_portal_wrap > .container,
.o_portal_wrap > .container-fluid,
#wrap > .container,
#wrap > .container-fluid,
#wrap > .container-lg,
#wrap > .container-xl,
#wrapwrap, #wrap,
#wrap > .row,
.o_portal_wrap > .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
}

body {
    background: #d4dbe5;
    overflow-y: hidden;
}

.container.pt-3.pb-5 {
    padding-bottom: 0 !important;
}


/* =========================================================================
   SPLIT LAYOUT
   ========================================================================= */

.sc-full-layout {
    display: flex;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: calc(100vh - 56px);
    align-items: stretch;
    position: relative;
}

/* ── Left panel ── */
.sc-left-panel {
    width: 450px;
    min-width: 450px;
    max-width: 450px;
    background: #fff;
    border-right: 1px solid #ced4da;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #ced4da transparent;
}
.sc-left-panel::-webkit-scrollbar { width: 4px; }
.sc-left-panel::-webkit-scrollbar-track { background: transparent; }
.sc-left-panel::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 2px; }

/* ── Right panel ── */
.sc-right-panel {
    flex: 1;
    background: #d4dbe5;
    transition: background .5s ease;
    overflow-y: auto;
    padding: 28px 32px;
    position: relative;
    min-width: 0;
    height: calc(100vh - 56px);
}
.sc-right-panel--active {
    background: #f0f4f8;
}


/* =========================================================================
   PLACEHOLDER
   ========================================================================= */

.sc-right-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: calc(100vh - 140px);
    color: #8fa3bb;
    text-align: center;
    gap: 12px;
    pointer-events: none;
    user-select: none;
}
.sc-placeholder-icon svg {
    width: 80px;
    height: 80px;
    color: #8fa3bb;
    opacity: .7;
}
.sc-placeholder-title {
    font-size: 18px;
    font-weight: 600;
    color: #7a95ad;
    letter-spacing: -.2px;
}
.sc-placeholder-sub {
    font-size: 13px;
    color: #9ab0c4;
    line-height: 1.6;
}


/* =========================================================================
   CARD & BODY
   ========================================================================= */

.sc-card {
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    color: #212529;
}

.sc-info-banner {
    background: #e8f4fd;
    border-bottom: 1px solid #b8ddf7;
    padding: 8px 12px;
    font-size: 11px;
    color: #1a6fa8;
    line-height: 1.4;
}

.sc-body {
    padding: 12px;
}

.sc-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 3px;
}


/* =========================================================================
   ADDRESS ROW: COUNTRY TRIGGER + INDEX INPUT
   ========================================================================= */

.sc-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: visible;          /* важно — дропдаун не обрезается */
    background: #fff;
    height: 30px;
    position: relative;
}
.sc-input-group--active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13,110,253,.15);
}
.sc-input-group--error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220,53,69,.15);
}

/* Триггер: флаг + код + стрелка */
.sc-country-trigger {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px 0 8px;
    height: 100%;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    border-radius: 4px 0 0 4px;
    transition: background .15s;
}
.sc-country-trigger:hover {
    background: #e9ecef;
}
.sc-country-flag {
    font-size: 14px;
    line-height: 1;
}
.sc-country-code {
    font-size: 11px;
    font-weight: 700;
    color: #495057;
}
.sc-country-arrow {
    font-size: 10px;
    color: #6c757d;
    margin-left: 1px;
}

.sc-divider {
    width: 1px;
    height: 16px;
    background: #ced4da;
    flex-shrink: 0;
}

.sc-input {
    border: none;
    outline: none;
    padding: 0 6px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
    color: #212529;
    background: transparent;
}

/* Дропдаун страны */
.sc-country-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 300;
    overflow: hidden;
}

.sc-country-search-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
}
.sc-country-search-input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}
.sc-country-search-input:focus {
    border-color: #0d6efd;
}

.sc-country-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ced4da transparent;
}

.sc-country-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: #212529;
    cursor: pointer;
}
.sc-country-opt:hover {
    background: #f0f4ff;
    color: #0d6efd;
}
.sc-country-opt-flag {
    font-size: 14px;
    flex-shrink: 0;
}
.sc-country-opt-code {
    font-size: 10px;
    font-weight: 700;
    color: #6c757d;
    background: #f1f3f5;
    border-radius: 3px;
    padding: 1px 4px;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}


/* =========================================================================
   ZIPCODE AUTOCOMPLETE
   ========================================================================= */

.sc-zipcode-dropdown {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 180px;
    overflow-y: auto;
}
.sc-zipcode-option {
    padding: 7px 10px;
    font-size: 11px;
    color: #212529;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.sc-zipcode-option:last-child { border-bottom: none; }
.sc-zipcode-option:hover { background: #f0f4ff; color: #0d6efd; }
.sc-zipcode-option--not-found {
    color: #999;
    cursor: default;
    pointer-events: none;
}


/* =========================================================================
   SHIPPING TYPE BUTTONS
   ========================================================================= */

.sc-shipping-types { display: flex; gap: 5px; flex-wrap: wrap; }

.sc-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 11px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all .15s;
}
.sc-type-btn:hover:not(:disabled) { border-color: #0d6efd; color: #0d6efd; }
.sc-type-btn--active { background: #0d6efd; border-color: #0d6efd; color: #fff !important; }
.sc-type-icon { width: 14px; height: 11px; flex-shrink: 0; }


/* =========================================================================
   BOX SECTION
   ========================================================================= */

.sc-box-section {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #fafbfc;
}
.sc-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.sc-box-title { font-size: 12px; font-weight: 600; color: #212529; }

.sc-delete-btn {
    width: 24px;
    height: 24px;
    background: #dc3545;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-delete-btn:hover { background: #bb2d3b; }


/* =========================================================================
   SELECT
   ========================================================================= */

.sc-select-wrapper { position: relative; }
.sc-select {
    width: 100%;
    appearance: none;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 26px 4px 8px;
    font-size: 11px;
    color: #6c757d;
    background: #fff;
    cursor: pointer;
    outline: none;
}
.sc-select:focus { border-color: #0d6efd; }
.sc-select-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    font-size: 12px;
}


/* =========================================================================
   UNIT TOGGLE
   ========================================================================= */

.sc-unit-toggle { display: inline-flex; border: 1px solid #ced4da; border-radius: 4px; overflow: hidden; }
.sc-unit-btn {
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all .15s;
}
.sc-unit-btn--active { background: #0d6efd; color: #fff; }
.sc-unit-btn:not(.sc-unit-btn--active):hover { background: #f0f4ff; }


/* =========================================================================
   DIMENSION INPUTS
   ========================================================================= */

.sc-input-suffix {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.sc-input--dim {
    border: none;
    outline: none;
    padding: 4px 6px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
    color: #212529;
}
.sc-suffix {
    padding: 0 6px;
    font-size: 10px;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    border-left: 1px solid #ced4da;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
}


/* =========================================================================
   WEIGHT INPUT
   ========================================================================= */

.sc-input-suffix--weight { width: 55%; }
.sc-input--weight {
    border: none;
    outline: none;
    padding: 4px 6px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
    color: #212529;
}
.sc-kg-select {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-left: 1px solid #ced4da;
}
.sc-kg-dropdown {
    appearance: none;
    border: none;
    background: transparent;
    padding: 4px 20px 4px 7px;
    font-size: 10px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    outline: none;
}
.sc-kg-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 11px;
    color: #6c757d;
}


/* =========================================================================
   INSURANCE & EXTRAS
   ========================================================================= */

.sc-valor-section { border-top: 1px solid #eee; padding-top: 7px; }
.sc-valor-label { font-size: 11px; color: #6c757d; display: block; margin-bottom: 4px; }
.sc-envio-row { display: flex; align-items: center; gap: 6px; }
.sc-envio-text { display: flex; align-items: center; gap: 3px; font-size: 11px; color: #212529; }
.sc-info-icon { color: #0d6efd; font-size: 12px; cursor: pointer; }
.sc-terms-link { font-size: 11px; color: #0d6efd; text-decoration: none; }
.sc-terms-link:hover { text-decoration: underline; }

/* Toggle switch */
.sc-toggle-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.sc-toggle-input { opacity: 0; width: 0; height: 0; }
.sc-toggle-slider {
    width: 28px; height: 16px; background: #ced4da;
    border-radius: 8px; transition: .2s; position: relative; display: block;
}
.sc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    background: #fff; border-radius: 50%; transition: .2s;
}
.sc-toggle-input:checked + .sc-toggle-slider { background: #0d6efd; }
.sc-toggle-input:checked + .sc-toggle-slider::after { left: 14px; }

/* Contraembolso */
.sc-contra-row { display: flex; align-items: center; gap: 5px; }
.sc-checkbox { width: 12px; height: 12px; cursor: pointer; accent-color: #0d6efd; }
.sc-contra-label { font-size: 11px; color: #495057; cursor: pointer; margin: 0; }

/* Ссылки */
.sc-more-services, .sc-prohib {
    text-align: center;
    padding: 4px 0;
    border-top: 1px solid #eee;
    margin-top: 6px;
}
.sc-more-link, .sc-prohib-link { font-size: 11px; color: #0d6efd; text-decoration: none; }
.sc-more-link:hover, .sc-prohib-link:hover { text-decoration: underline; }


/* =========================================================================
   QUANTITY
   ========================================================================= */

.sc-cantidad-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-top: 1px solid #eee;
}
.sc-cantidad-label { font-size: 12px; color: #495057; }
.sc-qty-control { display: flex; align-items: center; }
.sc-qty-btn {
    width: 24px; height: 24px;
    border: 1px solid #ced4da;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-qty-btn:first-child { border-radius: 4px 0 0 4px; }
.sc-qty-btn:last-child  { border-radius: 0 4px 4px 0; }
.sc-qty-btn:hover { background: #f0f4ff; border-color: #0d6efd; color: #0d6efd; }
.sc-qty-value {
    width: 32px; height: 24px;
    border-top: 1px solid #ced4da;
    border-bottom: 1px solid #ced4da;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #212529; background: #fff;
}

.sc-add-pkg-link { font-size: 12px; color: #0d6efd; text-decoration: none; font-weight: 500; }
.sc-add-pkg-link:hover { text-decoration: underline; }


/* =========================================================================
   CALCULATE BUTTON
   ========================================================================= */

.sc-cotizar-btn {
    display: block;
    width: 100%;
    padding: 9px;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    letter-spacing: .2px;
}
.sc-cotizar-btn:hover { background: #0b5ed7; }

.get-all-rates-btn:disabled,
.s2-cotizar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}


/* =========================================================================
   LOADING SPINNER
   ========================================================================= */

.sc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
    color: #6c757d;
}
.sc-spinner {
    width: 36px; height: 36px;
    border: 3px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: sc-spin .7s linear infinite;
}
@keyframes sc-spin { to { transform: rotate(360deg); } }
.sc-loading-text { font-size: 13px; color: #6c757d; }


/* =========================================================================
   RATE CARDS (RIGHT PANEL)
   ========================================================================= */

.sc-results-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}
.sc-results-title { font-size: 18px; font-weight: 700; color: #212529; letter-spacing: -.3px; }
.sc-results-count { font-size: 13px; color: #6c757d; font-weight: 400; }

.sc-rate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    cursor: pointer;
    animation: sc-fadeup .25s ease both;
}
.sc-rate-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 16px rgba(13,110,253,.12);
    transform: translateY(-1px);
}
@keyframes sc-fadeup {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sc-rate-card:nth-child(1) { animation-delay: .04s; }
.sc-rate-card:nth-child(2) { animation-delay: .08s; }
.sc-rate-card:nth-child(3) { animation-delay: .12s; }
.sc-rate-card:nth-child(4) { animation-delay: .16s; }
.sc-rate-card:nth-child(5) { animation-delay: .20s; }

.sc-rate-left { flex: 1; min-width: 0; }
.sc-rate-carrier { font-size: 14px; font-weight: 700; color: #212529; margin-bottom: 2px; }
.sc-rate-service { font-size: 12px; color: #495057; margin-bottom: 5px; }
.sc-rate-delivery { font-size: 11px; color: #6c757d; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.sc-rate-badges { display: flex; flex-wrap: wrap; gap: 4px; }

.sc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.sc-badge--dropoff { background: #e8f4fd; color: #1a6fa8; }
.sc-badge--insurance { background: #e8f7ee; color: #1a7a3c; }

.sc-rate-right { text-align: right; flex-shrink: 0; }
.sc-rate-total { font-size: 20px; font-weight: 700; color: #212529; white-space: nowrap; }
.sc-rate-currency { font-size: 13px; font-weight: 500; color: #6c757d; }
.sc-rate-base { font-size: 11px; color: #adb5bd; margin-top: 2px; white-space: nowrap; }

.sc-no-rates {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    background: #fff;
    margin-top: 12px;
}


/* =========================================================================
   AUTH MODAL
   ========================================================================= */

.sc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.45);
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: sc-fadein .15s ease;
}
.sc-modal-overlay[style*="display:none"] { display: none !important; }
@keyframes sc-fadein { from { opacity: 0; } to { opacity: 1; } }

.sc-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 28px;
    max-width: 360px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    animation: sc-slideup .2s ease;
}
@keyframes sc-slideup {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sc-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none; border: none;
    font-size: 16px; color: #adb5bd;
    cursor: pointer; line-height: 1;
    padding: 2px 6px; border-radius: 4px;
    transition: color .15s, background .15s;
}
.sc-modal-close:hover { color: #212529; background: #f0f0f0; }
.sc-modal-icon { margin-bottom: 14px; }
.sc-modal-title { font-size: 17px; font-weight: 700; color: #212529; margin-bottom: 8px; }
.sc-modal-text  { font-size: 13px; color: #6c757d; margin-bottom: 22px; line-height: 1.5; }
.sc-modal-actions { display: flex; gap: 10px; justify-content: center; }

.sc-modal-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}
.sc-modal-btn--primary   { background: #0d6efd; color: #fff; border: 1px solid #0d6efd; }
.sc-modal-btn--primary:hover   { background: #0b5ed7; border-color: #0b5ed7; color: #fff; }
.sc-modal-btn--secondary { background: #fff; color: #0d6efd; border: 1px solid #ced4da; }
.sc-modal-btn--secondary:hover { border-color: #0d6efd; background: #f0f4ff; color: #0d6efd; }

.s2-phone-wrap {
    display: flex;
    gap: 0;
}
.s2-phone-code-wrap {
    flex: 0 0 auto;
    width: 90px;
}
.s2-phone-code-wrap .s2-select {
    border-radius: 6px 0 0 6px;
    border-right: none;
}
.s2-phone-input {
    flex: 1;
    border-radius: 0 6px 6px 0;
}

.s2-phone-code-wrap .s2-select {
    border: 1px solid #ced4da; /* такой же как у s2-input */
    border-right: none;
}

.s2-input--error,
.s2-select--error {
    border-color: #dc3545 !important;
    outline: none;
}

.sc-rate-price-wrap {
    position: relative;
    text-align: right;
    cursor: default;
}
.sc-price-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 200px;
    z-index: 100;
    white-space: nowrap;
}
.sc-rate-price-wrap:hover .sc-price-tooltip {
    display: block;
}
.sc-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    font-size: 12px;
    color: #495057;
    padding: 3px 0;
}
.sc-tip-row--total {
    border-top: 1px solid #dee2e6;
    margin-top: 4px;
    padding-top: 6px;
    font-weight: 700;
    color: #0d6efd;
}