/* ==========================================================================
   Travel Utility Drawer & Modal Styles
   ========================================================================== */

.utility-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.utility-drawer-backdrop.active {
    display: block;
    opacity: 1;
}

.utility-drawer {
    position: fixed;
    top: 0;
    right: -520px;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 2050;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.utility-drawer.active {
    right: 0;
}

.utility-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #004D99, #0066CC);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.utility-title {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.utility-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.utility-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tabs Navigation in Drawer */
.utility-tabs-nav {
    display: flex;
    overflow-x: auto;
    background: #F1F5F9;
    padding: 8px 12px 0;
    gap: 4px;
    border-bottom: 1px solid var(--border);
}

.utility-tabs-nav .tab-btn {
    background: transparent;
    border: none;
    padding: 8px 14px;
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.utility-tabs-nav .tab-btn:hover {
    color: var(--primary);
}

.utility-tabs-nav .tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.utility-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-panel {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.panel-header h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.badge-live {
    background: #D1FAE5;
    color: #065F46;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

.helper-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Calculator Styles */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-tag {
    position: absolute;
    right: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0369A1;
    cursor: pointer;
}

.calc-results-box {
    background: white;
    border: 1.5px solid #E0F2FE;
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.calc-row.highlight {
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    color: var(--primary);
}

.calc-row.highlight strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0A84FF;
}

.quick-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.chip-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.chip-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}

.chip-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.counter-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.counter-input button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.counter-input input {
    width: 60px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 700;
}

/* Survival Phrases */
.phrase-grid {
    display: grid;
    gap: 10px;
}

.phrase-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.phrase-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.phrase-viet {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.phrase-pronun {
    font-size: 0.85rem;
    font-weight: 700;
    color: #059669;
    margin: 2px 0;
}

.phrase-mean {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tap-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Checklist */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    cursor: pointer;
}

.check-item input:checked + span {
    text-decoration: line-through;
    color: var(--text-muted);
}

.add-custom-check {
    display: flex;
    gap: 8px;
}

.btn-text-sm {
    background: none;
    border: none;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-text-sm:hover {
    color: var(--primary);
}

/* Emergency Contacts */
.emergency-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emergency-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.emergency-card.alert {
    border-color: #F87171;
    background: #FFF1F2;
}

.em-title {
    font-weight: 800;
    font-size: 0.95rem;
}

.em-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 2px 0 8px;
}

.em-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0284C7;
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
}

.emergency-card.alert .em-call-btn {
    background: #E11D48;
}

/* Tap to Enlarge Phrase Modal */
.phrase-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2500;
    display: none;
}

.phrase-enlarge-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    z-index: 2550;
    display: none;
}

.phrase-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}

.enlarge-badge {
    display: inline-block;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.enlarge-viet {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 10px;
}

.enlarge-pronun {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
}

.enlarge-mean {
    font-size: 1.1rem;
    color: var(--text-body);
}
