/* NBN Flow - Speed Understanding Guide (Dark Theme) */

/* Speed tier help icon (?) on plan cards */
.nbn-speed-tier {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nbn-speed-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(32, 214, 180, 0.15);
    border: 1.5px solid rgba(32, 214, 180, 0.4);
    border-radius: 50%;
    color: var(--troppo-lagoon, #20d6b4);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    vertical-align: middle;
}

.nbn-speed-help:hover {
    background: rgba(32, 214, 180, 0.3);
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(32, 214, 180, 0.3);
}

.nbn-speed-help:active {
    transform: scale(0.95);
}

/* Accordion trigger button */
.nbn-speed-guide-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    margin-top: 20px;
    background: var(--troppo-glass, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--troppo-glass-border, rgba(255, 255, 255, 0.15));
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.nbn-speed-guide-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--troppo-lagoon, #20d6b4);
}

.nbn-speed-guide-trigger__label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nbn-speed-guide-trigger__icon {
    font-size: 18px;
    transition: transform 0.3s;
}

.nbn-speed-guide-trigger.active .nbn-speed-guide-trigger__icon {
    transform: rotate(180deg);
}

/* Accordion panel */
.nbn-speed-guide-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.nbn-speed-guide-panel.active {
    max-height: 3000px;
}

.nbn-speed-guide-content {
    padding: 20px 0 0;
}

/* Close button */
.nbn-speed-guide-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    float: right;
    margin-bottom: 10px;
}

.nbn-speed-guide-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Category filter pills */
.nbn-speed-guide-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.nbn-speed-guide-filter {
    padding: 8px 16px;
    background: var(--troppo-glass, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--troppo-glass-border, rgba(255, 255, 255, 0.15));
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nbn-speed-guide-filter:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: var(--troppo-lagoon, #20d6b4);
}

.nbn-speed-guide-filter.active {
    background: var(--troppo-lagoon, #20d6b4);
    color: #0f0f1e;
    border-color: var(--troppo-lagoon, #20d6b4);
    font-weight: 600;
}

/* Table container */
.nbn-speed-guide-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nbn-speed-guide-table-wrap::-webkit-scrollbar {
    height: 6px;
}

.nbn-speed-guide-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.nbn-speed-guide-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Table styles - dark theme */
.nbn-speed-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.nbn-speed-guide-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.nbn-speed-guide-table th {
    padding: 12px 10px;
    background: linear-gradient(135deg, #1a2744 0%, #1e3a5f 100%);
    color: #fff;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid var(--troppo-lagoon, #20d6b4);
    white-space: nowrap;
    font-size: 13px;
}

.nbn-speed-guide-table th:first-child {
    text-align: left;
    min-width: 150px;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #1a2744;
}

.nbn-speed-guide-table th.sg-recommended {
    position: relative;
    border-top: 3px solid var(--troppo-sunset, #ff8e53);
}

.nbn-speed-guide-table th.sg-recommended .sg-best-match-tag {
    display: inline-block;
    background: var(--troppo-sunset, #ff8e53);
    color: #fff;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Unavailable tier column header */
.nbn-speed-guide-table th.sg-unavailable {
    opacity: 0.45;
}

/* Table body */
.nbn-speed-guide-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.nbn-speed-guide-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.nbn-speed-guide-table td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.85);
}

.nbn-speed-guide-table td:first-child {
    text-align: left;
    font-weight: 500;
    position: sticky;
    left: 0;
    background: var(--troppo-deep-ocean, #1a1a2e);
    z-index: 1;
}

.nbn-speed-guide-table tbody tr:hover td:first-child {
    background: #1f1f36;
}

/* Plan name row */
.nbn-speed-guide-table tr.sg-plan-row {
    background: rgba(32, 214, 180, 0.08);
}

.nbn-speed-guide-table tr.sg-plan-row td:first-child {
    background: rgba(32, 214, 180, 0.08);
}

.nbn-speed-guide-table .sg-plan-name {
    color: var(--troppo-lagoon, #20d6b4);
    font-weight: 700;
    font-size: 13px;
}

/* Speed tier label in header */
.nbn-speed-guide-table .sg-tier-speed {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.nbn-speed-guide-table .sg-tier-plan {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

/* Connection badges */
.sg-connection-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.sg-badge-all {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.sg-badge-fttp-hfc {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.sg-badge-fttp {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

/* Rating cells */
.sg-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: default;
}

.sg-rating:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sg-rating-limited {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.sg-rating-okay {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.sg-rating-good {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.sg-rating-great {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.sg-rating-excellent {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.sg-rating-awesome {
    background: rgba(32, 214, 180, 0.25);
    color: var(--troppo-lagoon, #20d6b4);
}

/* Value cells (download times, etc.) */
.sg-value {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
}

/* Metric description */
.sg-metric-desc {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    margin-top: 2px;
}

/* Typical speed row */
.sg-speed-value {
    font-weight: 600;
    color: var(--troppo-sunset, #ff8e53);
    font-size: 13px;
}

/* Unavailable tier cells */
.nbn-speed-guide-table td.sg-unavailable-cell {
    opacity: 0.35;
}

.sg-unavailable-badge {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
    font-style: italic;
}

/* Expand / See all plans button */
.nbn-speed-guide-expand {
    display: block;
    margin: 16px auto 0;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--troppo-lagoon, #20d6b4);
    border-radius: 25px;
    color: var(--troppo-lagoon, #20d6b4);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nbn-speed-guide-expand:hover {
    background: rgba(32, 214, 180, 0.15);
}

/* Table note / disclaimer */
.nbn-speed-guide-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.nbn-speed-guide-note strong {
    color: rgba(255, 255, 255, 0.7);
}

/* Device count row */
.sg-device-icon {
    font-size: 11px;
    margin-right: 2px;
}

/* Scroll hint indicator */
.nbn-speed-guide-scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.nbn-speed-guide-scroll-hint::before,
.nbn-speed-guide-scroll-hint::after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .nbn-speed-help {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }

    .nbn-speed-guide-trigger {
        padding: 14px 16px;
        font-size: 14px;
    }

    .nbn-speed-guide-filters {
        gap: 8px;
    }

    .nbn-speed-guide-filter {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 42px;
    }

    .nbn-speed-guide-table {
        font-size: 13px;
        min-width: 500px;
    }

    .nbn-speed-guide-table th,
    .nbn-speed-guide-table td {
        padding: 10px 8px;
    }

    .nbn-speed-guide-table th:first-child {
        min-width: 120px;
    }

    .nbn-speed-guide-table .sg-tier-speed {
        font-size: 14px;
    }

    .nbn-speed-guide-table .sg-tier-plan {
        font-size: 11px;
    }

    .sg-rating {
        padding: 5px 10px;
        font-size: 12px;
    }

    .sg-value {
        font-size: 13px;
    }

    .sg-speed-value {
        font-size: 13px;
    }

    .nbn-speed-guide-content {
        padding: 16px 0 0;
    }

    .nbn-speed-guide-scroll-hint {
        display: flex;
    }

    .nbn-speed-guide-table-wrap {
        scrollbar-width: auto;
        scrollbar-color: rgba(32, 214, 180, 0.3) rgba(255, 255, 255, 0.05);
    }

    .nbn-speed-guide-table-wrap::-webkit-scrollbar {
        height: 8px;
    }

    .nbn-speed-guide-table-wrap::-webkit-scrollbar-thumb {
        background: rgba(32, 214, 180, 0.3);
        border-radius: 4px;
    }

    .nbn-speed-guide-table-wrap::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .nbn-speed-guide-filters {
        gap: 6px;
    }

    .nbn-speed-guide-filter {
        padding: 9px 14px;
        font-size: 13px;
        min-height: 40px;
    }

    .nbn-speed-guide-table {
        min-width: 420px;
    }

    .nbn-speed-guide-table th:first-child {
        min-width: 100px;
    }

    .nbn-speed-guide-table td:first-child {
        font-size: 12px;
    }

    .sg-metric-desc {
        font-size: 10px;
    }
}
