/**
 * Template Name: assets/css/shortcodes.css
 * Description: Telecom plan grid, 9-column responsive table, and wide editorial popup modals with layered sub-modals.
 */

/* 1. Plans Grid Layout Container */
.tso-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 28px 0;
}

/* 2. Premium Plan Card */
.tso-plan-card {
    position: relative;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(8, 24, 58, 0.04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.tso-plan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--tso-op-color, #0066ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
    z-index: 2;
}

.tso-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(8, 24, 58, 0.12);
    border-color: var(--tso-op-color, #0066ff);
    background: #ffffff !important;
}

.tso-plan-card:hover::before { transform: scaleX(1); }
.tso-plan-card.has-discount  { border-color: #fecaca; }

/* 3. Sale Ribbon Badge */
.tso-plan-card .tso-sale-ribbon {
    position: absolute;
    top: 14px;
    right: -34px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 42px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    z-index: 3;
}

/* 4. Operator Logo, Name Badge, Title Row */
.tso-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.tso-operator-logo-inline {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: contain;
    background: #f8fafc;
    border: 2px solid var(--tso-op-color, #e2e8f0);
    padding: 3px;
    flex-shrink: 0;
    display: block;
    margin-top: 2px;
    transition: transform .2s ease;
}

.tso-plan-card:hover .tso-operator-logo-inline {
    transform: scale(1.06);
}

.tso-operator-logo-inline-fallback {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tso-op-color, #0066ff);
    color: #ffffff;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tso-card-op-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--tso-op-color, #0066ff);
    background: rgba(var(--tso-op-rgb, 0, 102, 255), 0.05);
    width: fit-content;
}

.tso-card-title-row .tso-card-title {
    flex: 1;
    min-width: 0;
    font-size: 1.02rem;
    line-height: 1.35;
    margin: 0;
    font-weight: 700;
    padding-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tso-card-title-row .tso-card-title a {
    color: #08183a;
    text-decoration: none !important;
    transition: color .2s ease;
    cursor: pointer;
}

.tso-card-title-row .tso-card-title a:hover {
    color: var(--tso-op-color, #0066ff) !important;
}

/* 5. Pricing Layout Block */
.tso-card-price {
    display: flex;
    align-items: center;
    gap: 6px 8px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
    min-height: 38px;
}

.tso-price-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tso-op-color, #08183a);
    font-family: 'Poppins', 'Inter', sans-serif;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.tso-price-old {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    white-space: nowrap;
}

.tso-plan-card.has-discount .tso-price-amount { color: #dc2626; }

.tso-savings-badge {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 6. Package Specifications Grid */
.tso-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
    row-gap: 0;
    margin-bottom: 14px;
    flex: 1;
    align-content: start;
}

.tso-spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #334155;
    min-width: 0;
}

.tso-card-specs > .tso-spec-item:nth-last-child(-n+2) { border-bottom: none; }

.tso-spec-icon {
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    color: var(--tso-op-color, #0066ff);
    font-size: 11px;
    flex-shrink: 0;
}

.tso-spec-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.tso-spec-value {
    font-weight: 700;
    color: #08183a;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tso-spec-label {
    font-size: 9.5px;
    color: #64748b;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tso-spec-item.spec-validity .tso-spec-icon { background: #ede9fe; color: #7c3aed; }
.tso-spec-item.spec-data .tso-spec-icon     { background: #ecfdf5; color: #059669; }
.tso-spec-item.spec-calls .tso-spec-icon    { background: #eff6ff; color: #2563eb; }
.tso-spec-item.spec-onnet .tso-spec-icon    { background: #fef3c7; color: #d97706; }
.tso-spec-item.spec-offnet .tso-spec-icon   { background: #fef2f2; color: #dc2626; }
.tso-spec-item.spec-social .tso-spec-icon   { background: #fce7f3; color: #db2777; }
.tso-spec-item.spec-sms .tso-spec-icon      { background: #e0f2fe; color: #0284c7; }
.tso-spec-item.spec-intl .tso-spec-icon     { background: #f0fdf4; color: #16a34a; }

/* 7. Action Buttons */
.tso-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.tso-btn-view {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--tso-op-color, #08183a) !important;
    color: #ffffff !important;
    text-align: center;
    padding: 11px 16px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 12.5px;
    text-decoration: none !important;
    transition: filter .2s ease;
    border: none;
    cursor: pointer;
}

.tso-btn-view:hover { filter: brightness(1.15); }

/* 8. Compact 9-Column Table View */
.tso-table-wrapper {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(8, 24, 58, 0.04);
    max-width: 100%;
    overflow: hidden;
    contain: paint;
}

.tso-table-controls {
    padding: 8px 14px;
    background: var(--tso-op-color, #08183a);
    display: flex;
    align-items: center;
}

.tso-table-search-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.tso-table-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.tso-table-search {
    width: 100%;
    padding: 7px 14px 7px 34px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    font-size: 12.5px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
}

.tso-table-search:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.tso-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.tso-table-scroll::-webkit-scrollbar { height: 4px; width: 4px; }
.tso-table-scroll::-webkit-scrollbar-track { background: #f8fafc; }
.tso-table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

table.tso-plan-table,
.tso-table-wrapper table.tso-plan-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    border: none !important;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    margin: 0;
    background: #ffffff;
}

.tso-plan-table .tso-th-operator { width: 6%; }
.tso-plan-table .tso-th-operator.tso-col-logo-only { width: 5%; }
.tso-plan-table .tso-th-title    { width: 24%; }
.tso-plan-table .tso-th-price    { width: 11%; }
.tso-plan-table .tso-th-data     { width: 10%; }
.tso-plan-table .tso-th-social   { width: 10%; }
.tso-plan-table .tso-th-calls    { width: 18%; }
.tso-plan-table .tso-th-sms      { width: 8%; }
.tso-plan-table .tso-th-validity { width: 7%; }
.tso-plan-table .tso-th-action   { width: 6%; }

table.tso-plan-table th {
    background: var(--tso-op-color, #08183a);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
    border-top: none !important;
    border-left: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-bottom: 1px solid #ffffff;
    padding: 8px 8px;
}

table.tso-plan-table th:last-child { border-right: none !important; }
table.tso-plan-table th span { color: #ffffff !important; }

table.tso-plan-table th.tso-sortable-th {
    cursor: pointer;
    user-select: none;
}
table.tso-plan-table th.tso-sortable-th:hover { filter: brightness(1.12); }
.tso-sort-icon { font-size: 10px; margin-left: 3px; color: rgba(255, 255, 255, 0.7) !important; }

table.tso-plan-table tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: auto 42px;
    border-left: none !important;
    transition: background-color .15s ease;
}

table.tso-plan-table tbody tr:nth-child(odd) td { background: #ffffff; }
table.tso-plan-table tbody tr:nth-child(even) td { background: rgba(var(--tso-op-rgb, 0, 102, 255), 0.02); }
table.tso-plan-table tbody tr:hover td { background: rgba(var(--tso-op-rgb, 0, 102, 255), 0.06) !important; }

table.tso-plan-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0 !important;
    border-top: none;
    border-left: none;
    vertical-align: middle;
    text-align: left;
    color: #334155;
    font-size: 11.5px;
    line-height: 1.35;
    display: table-cell;
    overflow-wrap: break-word;
    word-break: break-word;
}

table.tso-plan-table td:last-child { border-right: none !important; }
table.tso-plan-table tbody tr:last-child td { border-bottom: none; }

.tso-plan-table .tso-col-title { overflow: hidden; }

.tso-plan-table .tso-col-title a,
.tso-plan-table .tso-col-title > strong {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
    max-height: 2.6em !important;
    font-weight: 600;
    font-size: 12px;
    color: #08183a;
    text-decoration: none !important;
    transition: color .15s ease;
    cursor: pointer;
}

.tso-plan-table .tso-col-title a:hover { color: var(--tso-op-color, #0066ff); }

.tso-plan-table .tso-th-operator.tso-col-logo-only,
.tso-plan-table .tso-col-operator.tso-col-logo-only {
    text-align: center !important;
    padding: 7px 4px !important;
}

.tso-plan-table .tso-col-operator.tso-col-logo-only .tso-table-operator {
    justify-content: center !important;
}

.tso-plan-table .tso-col-data .tso-table-value {
    color: #059669;
    font-weight: 700;
    font-size: 12px;
}

.tso-plan-table .tso-table-social-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #fce7f3;
    color: #db2777;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
    white-space: nowrap;
}

.tso-table-calls-wrap {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    line-height: 1.25;
}

.tso-table-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    width: fit-content;
    line-height: 1.2;
    white-space: nowrap;
}

.tso-pill-allnet { background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.tso-pill-onnet  { background: #fef3c7; color: #b45309; }
.tso-pill-offnet { background: #fef2f2; color: #dc2626; }
.tso-pill-intl   { background: #f0fdf4; color: #15803d; font-weight: 700; border: 1px solid #bbf7d0; }

.tso-table-sms-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.tso-plan-table .tso-table-normal-price,
.tso-plan-table .tso-table-discount-price {
    font-weight: 800;
    font-size: 12.5px;
    color: var(--tso-op-color, #08183a);
    display: inline-block;
    line-height: 1.2;
}

.tso-plan-table .tso-table-discount-price { color: #b91c1c; }

.tso-plan-table .tso-table-old-price {
    color: #64748b;
    font-size: 9.5px;
    display: block;
    text-decoration: line-through;
    font-weight: 600;
    line-height: 1.1;
}

.tso-plan-table .tso-table-operator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.tso-plan-table .tso-table-operator-logo {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid var(--tso-op-color, #e2e8f0);
    padding: 2px;
    flex-shrink: 0;
    display: block;
}

.tso-plan-table .tso-table-operator-name {
    font-size: 10.5px;
    font-weight: 700;
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid var(--tso-op-color, #0066ff);
    background: rgba(var(--tso-op-rgb, 0, 102, 255), 0.05);
}

.tso-plan-table .tso-table-sale-tag {
    background: #dc2626 !important;
    color: #ffffff !important;
    font-size: 8.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    padding: 1px 4px !important;
    border-radius: 999px !important;
    margin-left: 3px !important;
    vertical-align: middle !important;
    display: inline-flex !important;
    align-items: center;
}

.tso-plan-table .tso-btn-sm {
    display: inline-block;
    padding: 4px 8px;
    background: var(--tso-op-color, #08183a) !important;
    color: #fff !important;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .15s ease;
    white-space: nowrap;
    line-height: 1.2;
    cursor: pointer;
}

.tso-plan-table .tso-btn-sm:hover { filter: brightness(1.2); }

/* 9. Single Details Table */
.tso-details-table-wrap {
    margin: 16px 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.tso-details-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.45;
}

.tso-details-table th,
.tso-details-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    overflow-wrap: break-word;
}

.tso-details-table th {
    background: #08183a;
    color: #fff;
    font-size: 13px;
    text-align: left;
    padding: 10px 12px;
}

.tso-details-table td:first-child {
    width: 35%;
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
}

.tso-details-table code {
    background: #e0edff;
    color: #0066ff;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

/* 10. Empty State */
.tso-no-plans {
    padding: 26px 18px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    text-align: center;
    margin: 18px 0;
}

.tso-no-plans p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
}

/* 11. Responsive Grid & Table Breakpoints */
@media (max-width: 600px) {
    .tso-plans-grid { grid-template-columns: 1fr; gap: 16px; }
    .tso-plan-card { padding: 18px 16px; }
    .tso-price-amount { font-size: 1.55rem; }
}

@media (max-width: 768px) {
    .tso-table-wrapper { border-radius: 8px; margin: 10px 0; }
    .tso-table-controls { padding: 6px 10px; }
    .tso-table-search { font-size: 12px; padding: 5px 8px 5px 28px; }
    table.tso-plan-table, .tso-table-wrapper table.tso-plan-table { min-width: 780px; font-size: 11px; }
    table.tso-plan-table th, table.tso-plan-table td { padding: 5px 6px; }
    .tso-plan-table .tso-table-operator-name { display: none !important; }
    .tso-plan-table .tso-table-operator-logo { width: 22px; height: 22px; margin: 0 auto; }
    table.tso-plan-table th.tso-th-operator span { font-size: 0; }
    table.tso-plan-table th.tso-th-operator span::before { content: '#'; font-size: 11px; font-weight: 800; display: inline-block; }
}

/* =========================================================
   12. WIDE EDITORIAL POPUP MODAL ARCHITECTURE (900px Desktop)
   ========================================================= */

body.tso-modal-locked {
    overflow: hidden !important;
    touch-action: none;
}

.tso-modals-pool {
    display: contents;
}

.tso-popup-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s cubic-bezier(0.16, 1, 0.3, 1), visibility .22s ease;
}

.tso-popup-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tso-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 58, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.tso-popup-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 24px 60px rgba(8, 24, 58, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(12px);
    transition: transform .24s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.tso-popup-modal.is-open .tso-popup-dialog {
    transform: scale(1) translateY(0);
}

.tso-popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    z-index: 10;
}

.tso-popup-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: scale(1.08);
}

.tso-popup-body {
    overflow-y: auto;
    padding: 24px 28px;
    -webkit-overflow-scrolling: touch;
}

/* 13. Rich Modal Editorial Components */
.tso-offer-modal-sheet {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.tso-offer-modal-sheet .tso-hero-editorial-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(8, 24, 58, 0.04);
}

.tso-offer-modal-sheet .tso-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tso-offer-modal-sheet .tso-brand-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    border: 1.5px solid var(--tso-op-color, #0066ff);
    padding: 2px;
    flex-shrink: 0;
}

.tso-offer-modal-sheet .tso-brand-pill {
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
}

.tso-offer-modal-sheet .tso-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tso-offer-modal-sheet .tso-price-figure {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1;
}

.tso-offer-modal-sheet .tso-price-old-striked {
    color: #94a3b8;
    font-size: 1.1rem;
    text-decoration: line-through;
    margin-right: 6px;
}

.tso-offer-modal-sheet .tso-req-load-badge {
    font-size: 11px;
    color: #0369a1;
    background: #f0f9ff;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #bae6fd;
    font-weight: 600;
}

.tso-offer-modal-sheet .tso-req-load-badge.no-tax {
    color: #15803d !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

.tso-offer-modal-sheet .tso-hero-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0;
}

.tso-offer-modal-sheet .tso-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tso-offer-modal-sheet .tso-btn-subscribe {
    background: var(--tso-op-color, #0066ff);
    color: #ffffff;
    border-color: var(--tso-op-color, #0066ff);
}

.tso-offer-modal-sheet .tso-btn-subscribe:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.tso-offer-modal-sheet .tso-btn-report {
    background: #ffffff;
    color: #475569;
    border-color: #cbd5e1;
}

.tso-offer-modal-sheet .tso-btn-report:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #ef4444;
}

.tso-offer-modal-sheet .tso-editorial-block {
    padding: 14px 0 !important;
    border-bottom: 1px solid #f1f5f9;
}

.tso-offer-modal-sheet .tso-editorial-block:last-child {
    border-bottom: none;
}

.tso-offer-modal-sheet .tso-sec-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #08183a;
    margin: 0 0 10px 0 !important;
    line-height: 1.3;
}

.tso-offer-modal-sheet .tso-editorial-para {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #1e293b;
    margin: 0 0 8px 0;
}

/* 14. Modal Tables & Status Badges */
.tso-offer-modal-sheet .tso-shot-table,
.tso-offer-modal-sheet .tso-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
    margin: 0 !important;
}

.tso-offer-modal-sheet .tso-shot-table th,
.tso-offer-modal-sheet .tso-compare-table th {
    background: var(--tso-op-color, #0066ff) !important;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 10px;
    white-space: nowrap;
}

.tso-offer-modal-sheet .tso-shot-table td,
.tso-offer-modal-sheet .tso-compare-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.tso-offer-modal-sheet .tso-current-row td {
    background: #eff6ff !important;
}

.tso-offer-modal-sheet .tso-badge-current {
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.tso-offer-modal-sheet .tso-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.tso-offer-modal-sheet .tso-stat-good { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.tso-offer-modal-sheet .tso-stat-avg  { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.tso-offer-modal-sheet .tso-stat-high { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* 15. Modal Price History Chart & FAQs */
.tso-offer-modal-sheet .tso-graph-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 8px;
}

.tso-offer-modal-sheet .tso-accordion .tso-acc-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 6px;
    overflow: hidden;
}

.tso-offer-modal-sheet .tso-accordion .tso-acc-head {
    padding: 9px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
}

.tso-offer-modal-sheet .tso-accordion .tso-acc-head h3 {
    font-size: 13px;
    font-weight: 600;
    color: #08183a;
    margin: 0 !important;
}

.tso-offer-modal-sheet .tso-accordion .tso-acc-head::-webkit-details-marker { display: none; }

.tso-offer-modal-sheet .tso-accordion .tso-acc-body {
    padding: 0 12px 9px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.55;
}

/* 16. Nested Sub-Modals Layering (z-index Fix) */
.tso-offer-modal-sheet .tso-modal {
    position: fixed;
    inset: 0;
    z-index: 1000005 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tso-offer-modal-sheet .tso-modal.is-open {
    display: flex;
    animation: tsoSubModalFade .18s ease;
}

@keyframes tsoSubModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tso-offer-modal-sheet .tso-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 58, 0.7);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.tso-offer-modal-sheet .tso-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(8, 24, 58, 0.35);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
}

.tso-offer-modal-sheet .tso-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tso-offer-modal-sheet .tso-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #08183a;
    margin: 0 0 4px !important;
}

.tso-offer-modal-sheet .tso-modal-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 14px !important;
}

.tso-offer-modal-sheet .tso-modal-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.tso-offer-modal-sheet .tso-modal-input,
.tso-offer-modal-sheet .tso-modal-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.tso-offer-modal-sheet .tso-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11.5px;
    color: #475569;
    margin-bottom: 12px;
}

.tso-offer-modal-sheet .tso-modal-submit {
    display: block;
    width: 100%;
    background: var(--tso-op-color, #0066ff);
    color: #ffffff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

/* 17. Mobile & Tablet Responsive Modal Adaptations */
@media (max-width: 900px) {
    .tso-popup-dialog {
        max-width: 95vw;
    }
}

@media (max-width: 600px) {
    .tso-popup-modal {
        padding: 0;
        align-items: flex-end;
    }

    .tso-popup-dialog {
        max-width: 100%;
        max-height: 92vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        transform: translateY(100%);
    }

    .tso-popup-modal.is-open .tso-popup-dialog {
        transform: translateY(0);
    }

    .tso-popup-body {
        padding: 18px 14px;
    }

    .tso-offer-modal-sheet .tso-hero-editorial-card {
        flex-direction: column;
        padding: 16px 14px;
    }

    .tso-offer-modal-sheet .tso-hero-actions {
        width: 100%;
        margin-top: 6px;
    }
}