/* =========================================
   SMART TRAVEL ASSISTANT WIDGET
   ViaConecta — Premium Glassmorphic Design
   ========================================= */

/* --- Flag Icons Rectangle Override (Bypasses global squircle styles) --- */
#ta-overlay .fi {
    border-radius: 4px !important;
    border: 1px solid rgba(255, 107, 0, 0.6) !important; /* Elegant thin orange brand border */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    aspect-ratio: 4/3 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
#ta-overlay img.fi {
    object-fit: cover !important;
    border-radius: 4px !important;
}

/* Specific flag sizes within the widget */
#ta-popular-chips .ta-chip-flag .fi,
.ta-popular-chip .ta-chip-flag .fi {
    width: 20px !important;
    height: 15px !important;
}
.ta-suggestion-flag .fi {
    width: 20px !important;
    height: 15px !important;
}
.ta-result-flag .fi {
    width: 32px !important;
    height: 24px !important;
    border-radius: 3px !important;
}

/* --- FAB Button --- */
#ta-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9990;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.5);
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s;
    animation: ta-pulse 2.8s ease-in-out infinite;
}
#ta-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 40px rgba(255, 107, 0, 0.7);
    animation: none;
}
#ta-fab .ta-fab-icon {
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.3s;
}
#ta-fab .ta-fab-label {
    position: absolute;
    right: 72px;
    white-space: nowrap;
    background: rgba(15,15,25,0.95);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}
#ta-fab:hover .ta-fab-label {
    opacity: 1;
    transform: translateX(0);
}
@keyframes ta-pulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(255,107,0,0.5), 0 0 0 0 rgba(255,107,0,0.4); }
    50% { box-shadow: 0 8px 30px rgba(255,107,0,0.5), 0 0 0 14px rgba(255,107,0,0); }
}

/* --- Overlay --- */
#ta-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(5, 5, 15, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
#ta-overlay.ta-open {
    opacity: 1;
    pointer-events: all;
}

/* --- Modal --- */
#ta-modal {
    width: 100%;
    max-width: 520px;
    background: rgba(16, 16, 30, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 36px 36px 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07);
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(.34,1.46,.64,1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
}
#ta-overlay.ta-open #ta-modal {
    transform: translateY(0) scale(1);
}
#ta-modal::-webkit-scrollbar { display: none; }

/* --- Close Button ---
   KEY FIX: The close button is absolute inside the modal.
   The header h2 needs enough right padding to not overlap it. */
#ta-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10; /* stays above all content */
    flex-shrink: 0;
}
#ta-close:hover { background: rgba(255,107,0,0.2); color: #ff6b00; }

/* --- Header ---
   KEY FIX: Add padding-right so title never slides under the close button. */
.ta-header {
    text-align: center;
    margin-bottom: 28px;
    /* Reserve space for the close button (36px width + 16px right + 8px gap = 60px) */
    padding: 0 52px;
}
.ta-header .ta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255,107,0,0.15), rgba(255,149,0,0.1));
    border: 1px solid rgba(255,107,0,0.3);
    color: #ff9500;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.ta-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.25;
}
.ta-header p {
    color: rgba(255,255,255,0.5);
    font-size: 0.88rem;
    margin: 0;
}

/* --- Progress Bar --- */
.ta-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}
.ta-progress-step {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255,255,255,0.1);
    transition: background 0.4s;
}
.ta-progress-step.active {
    background: linear-gradient(90deg, #ff6b00, #ff9500);
}

/* --- Steps --- */
.ta-step { display: none; }
.ta-step.ta-visible { display: block; animation: ta-fadein 0.3s ease; }
@keyframes ta-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ta-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff9500;
    margin-bottom: 8px;
}
.ta-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

/* --- Search Input --- */
.ta-search-wrap {
    position: relative;
    margin-bottom: 12px;
}
.ta-search-wrap > i,
#ta-search-icon-placeholder {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.35);
    font-size: 0.95rem;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
#ta-search-icon-placeholder .fi {
    border-radius: 2px;
    font-size: 1.15rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#ta-country-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 14px 16px 14px 44px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    /* Prevent iOS zoom on focus (font-size must be >= 16px for iOS) */
    font-size: max(16px, 0.95rem);
}
#ta-country-input::placeholder { color: rgba(255,255,255,0.3); }
#ta-country-input:focus {
    border-color: rgba(255,107,0,0.5);
    background: rgba(255,255,255,0.07);
}

/* --- Suggestions List --- */
#ta-suggestions {
    background: rgba(20,20,38,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,107,0,0.3) transparent;
}
#ta-suggestions.visible { display: block; }
.ta-suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    /* Ensure good tap targets */
    min-height: 48px;
}
.ta-suggestion-item.ta-no-res {
    cursor: default;
    color: rgba(255,255,255,0.4);
}
.ta-suggestion-item:last-child { border-bottom: none; }
.ta-suggestion-item:hover, .ta-suggestion-item.selected {
    background: rgba(255,107,0,0.12);
    color: #fff;
}
/* Flag sprites in suggestion list */
.ta-suggestion-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.ta-suggestion-flag .fi {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    display: inline-block;
    flex-shrink: 0;
}

/* --- Popular Destination Chips --- */
#ta-popular-wrap {
    margin-top: 16px;
}
.ta-popular-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ta-popular-label i {
    color: #ff9500;
    font-size: 0.75rem;
}
#ta-popular-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ta-popular-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 6px 12px 6px 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    font-family: inherit;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
    white-space: nowrap;
}
.ta-popular-chip:hover {
    background: rgba(255,107,0,0.15);
    border-color: rgba(255,107,0,0.5);
    color: #fff;
    transform: translateY(-1px);
}
.ta-popular-chip:active {
    transform: translateY(0);
}
.ta-chip-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}
.ta-chip-flag .fi {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    display: inline-block;
    flex-shrink: 0;
}
.ta-chip-flag img.fi {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}
.ta-chip-name {
    font-weight: 500;
}

/* --- Days Slider --- */
.ta-slider-wrap {
    margin: 8px 0 20px;
}
.ta-days-display {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    color: #ff9500;
    margin-bottom: 4px;
    line-height: 1;
}
.ta-days-display span { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,0.5); margin-left: 4px; }
#ta-days-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: rgba(255,255,255,0.1);
    outline: none;
    margin: 16px 0 8px;
}
#ta-days-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,107,0,0.5);
}
#ta-days-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(255,107,0,0.5);
}
.ta-slider-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
}

/* --- Usage Cards --- */
.ta-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.ta-usage-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s;
    /* Good minimum tap target */
    min-height: 80px;
}
.ta-usage-card:hover {
    border-color: rgba(255,107,0,0.3);
    background: rgba(255,107,0,0.06);
}
.ta-usage-card.selected {
    border-color: #ff6b00;
    background: rgba(255,107,0,0.12);
    box-shadow: 0 0 0 2px rgba(255,107,0,0.25);
}
.ta-usage-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.22s, border-color 0.22s;
}
.ta-usage-icon i {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.55);
    transition: color 0.22s;
}
.ta-usage-card.selected .ta-usage-icon {
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.4);
}
.ta-usage-card.selected .ta-usage-icon i {
    color: #fff;
}
.ta-usage-card:hover:not(.selected) .ta-usage-icon {
    background: rgba(255, 107, 0, 0.12);
    border-color: rgba(255, 107, 0, 0.3);
}
.ta-usage-card:hover:not(.selected) .ta-usage-icon i {
    color: #ff9500;
}
.ta-usage-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.ta-usage-desc {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.35;
}

/* --- Result Card --- */
.ta-result-card {
    background: linear-gradient(135deg, rgba(255,107,0,0.1), rgba(255,149,0,0.06));
    border: 1px solid rgba(255,107,0,0.25);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
}
.ta-result-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
/* Flag sprite in result card */
.ta-result-flag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.ta-result-flag .fi {
    width: 42px;
    height: 32px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    display: inline-block;
}
.ta-result-country {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    word-break: break-word;
}
.ta-result-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}
.ta-plan-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.ta-plan-stat {
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}
.ta-plan-stat-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ff9500;
    display: block;
    word-break: break-word;
}
.ta-plan-stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
    display: block;
}

/* --- Tips --- */
.ta-tips-section { margin-bottom: 18px; }
.ta-tips-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.ta-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.45;
}
.ta-tip-item .ta-tip-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #ff6b00;
    margin-top: 6px;
}

.ta-fact-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    font-style: italic;
    line-height: 1.5;
}

/* --- Price badge in result header --- */
.ta-price-from {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(255,107,0,0.25), rgba(255,149,0,0.15));
    border: 1px solid rgba(255,107,0,0.4);
    color: #ff9500;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* --- Regional Pack Suggestion Banner --- */
.ta-pack-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 3px solid #ff6b00;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 4px;
    margin-bottom: 16px;
    transition: background 0.2s ease;
}
.ta-pack-banner:hover {
    background: rgba(255,255,255,0.07);
}
.ta-pack-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.ta-pack-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ta-pack-banner-text strong {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.9);
}
.ta-pack-banner-text span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}
.ta-pack-banner-btn {
    background: rgba(255,107,0,0.15);
    border: 1px solid rgba(255,107,0,0.4);
    color: #ff9500;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.ta-pack-banner-btn:hover {
    background: #ff6b00;
    color: #fff;
}

/* --- Buttons --- */
.ta-btn-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.ta-btn-back {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.45);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
    order: 2;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: center;
    display: inline-block;
    margin: 0 auto;
    /* Good tap target */
    min-height: 44px;
    line-height: 28px;
}
.ta-btn-back:hover { color: #fff; }
.ta-btn-next {
    width: 100%;
    max-width: 280px;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    border: none;
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255,107,0,0.35);
    transition: all 0.22s;
    order: 1;
    min-height: 50px;
}
.ta-btn-next:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255,107,0,0.5); }
.ta-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ta-btn-buy {
    display: flex;
    width: 100%;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    border: none;
    color: #fff;
    padding: 16px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255,107,0,0.4);
    text-decoration: none;
    transition: all 0.22s;
    box-sizing: border-box;
}
.ta-btn-buy:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,0,0.55); }

/* --- No Match State --- */
.ta-no-match {
    text-align: center;
    padding: 20px 0;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}
.ta-no-match i { font-size: 2rem; color: rgba(255,107,0,0.4); margin-bottom: 10px; display: block; }

/* =============================================
   MOBILE RESPONSIVE  (≤ 520px)
   ============================================= */
@media (max-width: 520px) {
    /* Overlay uses padding to create a gorgeous floating gap and centers the card */
    #ta-overlay {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
        align-items: center;
        justify-content: center;
    }

    /* Modal becomes a floating glass card with all four corners rounded.
       Using display: flex ensures dynamic sizing up to max-height, with internal scrolling. */
    #ta-modal {
        border-radius: 24px;
        padding: 0;
        max-height: 80vh;
        height: auto;
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Automatically clips child components like bottom buttons bar */
        box-shadow: 0 20px 60px rgba(0,0,0,0.65);
        transform: translateY(20px) scale(0.96);
    }
    #ta-overlay.ta-open #ta-modal {
        transform: translateY(0) scale(1);
    }

    /* Close button stays fixed in top-right corner of sheet */
    #ta-close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
        z-index: 20;
    }

    /* Fixed top header area inside modal sheet */
    .ta-header {
        /* Mirror padding on left (20px) and right (56px) to prevent close button collision */
        padding: 20px 56px 0 20px;
        margin-bottom: 12px;
        text-align: left;
        flex-shrink: 0;
    }
    .ta-header h2 {
        font-size: 1.2rem;
        line-height: 1.3;
        margin: 0 0 4px;
        word-break: break-word;
    }
    .ta-header p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* Fixed progress bar */
    .ta-progress {
        margin: 0 20px 16px;
        flex-shrink: 0;
    }

    /* Scrollable Step Content Area.
       Each step takes up all remaining vertical space and scrolls content if overflowed. */
    .ta-step.ta-visible {
        display: block;
        flex: 1;
        overflow-y: auto;
        padding: 0 20px 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch; /* Smooth iOS inertia scroll */
    }
    .ta-step.ta-visible::-webkit-scrollbar {
        display: none;
    }

    .ta-step-label {
        font-size: 0.72rem;
    }
    .ta-step-title {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    /* Search input — prevent iOS auto-zoom by setting font-size >= 16px */
    #ta-country-input {
        font-size: 16px;
        padding: 13px 14px 13px 42px;
        border-radius: 12px;
    }

    /* Suggestions panel */
    #ta-suggestions {
        max-height: 160px;
        border-radius: 12px;
    }
    .ta-suggestion-item {
        padding: 11px 14px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Days slider */
    .ta-days-display {
        font-size: 2.4rem;
    }
    #ta-days-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    /* Usage cards — stack as horizontal list items */
    .ta-usage-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ta-usage-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 14px;
        padding: 13px 16px;
        border-radius: 12px;
        min-height: 60px;
    }
    .ta-usage-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        margin: 0;
        flex-shrink: 0;
    }
    .ta-usage-name {
        font-size: 0.88rem;
        margin-bottom: 2px;
    }
    .ta-usage-desc {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    /* Result card */
    .ta-result-card {
        padding: 16px;
        margin-bottom: 14px;
    }
    .ta-result-flag .fi { width: 34px; height: 26px; border-radius: 4px; }
    .ta-result-country { font-size: 1rem; }
    .ta-result-subtitle { font-size: 0.75rem; }

    /* Recommended plan specifications table (labels left, values right) */
    .ta-plan-details {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 14px;
    }
    .ta-plan-stat {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        text-align: left;
        border-radius: 10px;
    }
    .ta-plan-stat-label {
        font-size: 0.8rem;
        margin-top: 0;
        color: rgba(255,255,255,0.5);
    }
    .ta-plan-stat-value {
        font-size: 1rem;
        font-weight: 800;
        margin-top: 0;
        text-align: right;
    }

    /* Tips & Facts */
    .ta-tip-item {
        font-size: 0.8rem;
    }
    .ta-tips-title {
        font-size: 0.72rem;
    }
    .ta-fact-box {
        font-size: 0.78rem;
        padding: 10px 12px;
    }

    /* Fixed buttons bar at the bottom of the modal, rounded along with parent card */
    .ta-btn-row {
        padding: 16px 20px;
        margin-top: 0;
        gap: 10px;
        background: rgba(16, 16, 30, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        box-sizing: border-box;
        flex-shrink: 0; /* Keep pinned at bottom */
        z-index: 15;
    }
    .ta-btn-next {
        max-width: 100%;
        width: 100%;
        padding: 15px 20px;
        font-size: 0.95rem;
        min-height: 52px;
    }
    .ta-btn-back {
        font-size: 0.82rem;
        min-height: 40px;
    }
    .ta-btn-buy {
        padding: 15px 20px;
        font-size: 0.95rem;
        min-height: 52px;
    }

    /* Smaller FAB on mobile */
    #ta-fab {
        bottom: 20px;
        right: 18px;
        width: 56px;
        height: 56px;
    }
    #ta-fab .ta-fab-icon {
        font-size: 1.35rem;
    }
    #ta-fab .ta-fab-label {
        display: none !important;
    }
}

/* Tiny phones layout optimization */
@media (max-width: 360px) {
    .ta-header h2 {
        font-size: 1rem;
    }
    #ta-modal {
        max-height: 85vh;
        height: auto;
    }
    .ta-plan-stat-value {
        font-size: 0.9rem;
    }
}
