/* ============================================================
   SecureBank — Premium Fintech Design System
   ============================================================ */

:root {
    /* Brand Colors */
    --color-primary: #123B70;
    --color-cta: #2878DF;
    --color-accent: #0F9F83;
    --color-soft-bg: #F8FAFC;
    --color-text: #172B4D;
    --color-border: #E5EAF1;
    --color-white: #FFFFFF;
    --color-danger: #E53E3E;
    --color-warning: #F59E0B;
    --color-success: #0F9F83;
    --color-muted: #6B7A99;
    --color-light-grey: #F1F5F9;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(23,43,77,0.04);
    --shadow-md: 0 4px 16px rgba(23,43,77,0.06);
    --shadow-lg: 0 10px 30px rgba(23,43,77,0.08);
    --shadow-xl: 0 20px 60px rgba(23,43,77,0.12);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Typography */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --bottom-nav-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--color-soft-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-cta); text-decoration: none; }
a:hover { color: var(--color-primary); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--color-text); line-height: 1.3; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--color-muted) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-cta { color: var(--color-cta) !important; }

/* ===== Layout — App Shell ===== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-primary);
    color: white;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
}

.sidebar-brand-name { font-weight: 700; font-size: 1.1rem; color: white; }
.sidebar-brand-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

.sidebar-nav { padding: 1rem 0; flex: 1; }

.sidebar-section-label {
    font-size: 0.7rem; font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.5rem 0.5rem;
}

.sidebar-link {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: white; background: rgba(255,255,255,0.08);
    text-decoration: none;
}

.sidebar-link.active {
    color: white; background: rgba(40,120,223,0.15);
    border-left-color: var(--color-cta);
}

.sidebar-link i { width: 22px; text-align: center; font-size: 1.1rem; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    padding-bottom: calc(2rem + var(--bottom-nav-height));
}

/* ===== Top Bar ===== */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}

.topbar h1 { margin: 0; }

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ===== Cards ===== */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
}

.card-header h3 { margin: 0; font-size: 1rem; }

.card-body { padding: 1.5rem; }

.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); }

/* Stat Cards */
.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.stat-icon.blue { background: rgba(18,59,112,0.1); color: var(--color-primary); }
.stat-icon.teal { background: rgba(15,159,131,0.1); color: var(--color-accent); }
.stat-icon.cta { background: rgba(40,120,223,0.1); color: var(--color-cta); }
.stat-icon.red { background: rgba(229,62,62,0.1); color: var(--color-danger); }
.stat-icon.amber { background: rgba(245,158,11,0.1); color: var(--color-warning); }
.stat-icon.grey { background: rgba(107,122,153,0.1); color: var(--color-muted); }

.stat-label { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.25rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--color-text); }

/* ===== Balance Card ===== */
.balance-card {
    background: linear-gradient(135deg, #123B70 0%, #1a5290 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.balance-card::before {
    content: '';
    position: absolute;
    bottom: -60px; right: 60px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(40,120,223,0.15);
}

.balance-label { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; }
.balance-amount { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; }

/* ===== Buttons ===== */
.btn { font-family: var(--font-sans); font-weight: 600; border-radius: var(--radius-sm); padding: 0.625rem 1.25rem; font-size: 0.9rem; transition: all 0.2s; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }

.btn-primary { background: var(--color-cta); color: white; border-color: var(--color-cta); }
.btn-primary:hover { background: #2070cc; color: white; border-color: #2070cc; }

.btn-secondary { background: var(--color-white); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-light-grey); }

.btn-success { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.btn-success:hover { background: #0d8a72; color: white; }

.btn-danger { background: var(--color-danger); color: white; border-color: var(--color-danger); }
.btn-danger:hover { background: #cc3535; color: white; }

.btn-outline-primary { background: transparent; color: var(--color-cta); border-color: var(--color-cta); }
.btn-outline-primary:hover { background: var(--color-cta); color: white; }

.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Forms ===== */
.form-control, .form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(40,120,223,0.1);
}

.form-label { font-size: 0.85rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.375rem; display: block; }
.form-text { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.25rem; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group-text { padding: 0.625rem 0.875rem; background: var(--color-light-grey); border: 1px solid var(--color-border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 0.9rem; color: var(--color-muted); }
.input-group .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.invalid-feedback { font-size: 0.8rem; color: var(--color-danger); margin-top: 0.25rem; }
.is-invalid { border-color: var(--color-danger) !important; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 600; border-radius: 100px; gap: 0.25rem; }
.badge-success { background: rgba(15,159,131,0.1); color: var(--color-accent); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--color-warning); }
.badge-danger { background: rgba(229,62,62,0.1); color: var(--color-danger); }
.badge-info { background: rgba(40,120,223,0.1); color: var(--color-cta); }
.badge-muted { background: rgba(107,122,153,0.1); color: var(--color-muted); }

/* ===== Tables ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); }
td { padding: 0.875rem 1rem; font-size: 0.875rem; border-bottom: 1px solid var(--color-border); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-soft-bg); }

/* ===== Progress Bar (Transfer Verification) ===== */
.progress-container { margin: 2rem 0; }
.progress-bar-track {
    width: 100%; height: 8px;
    background: var(--color-border);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-cta), var(--color-accent));
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}
.progress-stages {
    display: flex; justify-content: space-between;
    margin-top: 1rem;
}
.progress-stage {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; flex: 1; position: relative;
}
.progress-stage-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
    background: var(--color-light-grey);
    color: var(--color-muted);
    border: 2px solid var(--color-border);
    transition: all 0.3s;
    z-index: 1;
}
.progress-stage.active .progress-stage-dot {
    background: var(--color-cta); color: white; border-color: var(--color-cta);
    box-shadow: 0 0 0 4px rgba(40,120,223,0.15);
}
.progress-stage.complete .progress-stage-dot {
    background: var(--color-accent); color: white; border-color: var(--color-accent);
}
.progress-stage-label { font-size: 0.8rem; font-weight: 600; color: var(--color-muted); }
.progress-stage.active .progress-stage-label, .progress-stage.complete .progress-stage-label { color: var(--color-text); }

/* OTP Input */
.otp-input-group { display: flex; gap: 0.625rem; justify-content: center; margin: 1.5rem 0; }
.otp-input {
    width: 50px; height: 60px;
    text-align: center; font-size: 1.5rem; font-weight: 700;
    border: 2px solid var(--color-border); border-radius: var(--radius-sm);
    background: white;
}
.otp-input:focus { outline: none; border-color: var(--color-cta); box-shadow: 0 0 0 3px rgba(40,120,223,0.1); }

/* PIN Input */
.pin-input-group { display: flex; gap: 0.625rem; justify-content: center; margin: 1.5rem 0; }
.pin-input {
    width: 55px; height: 65px;
    text-align: center; font-size: 1.75rem; font-weight: 700;
    border: 2px solid var(--color-border); border-radius: var(--radius-sm);
    background: white; -webkit-text-security: disc; text-security: disc;
}
.pin-input:focus { outline: none; border-color: var(--color-cta); box-shadow: 0 0 0 3px rgba(40,120,223,0.1); }

/* ===== Modals ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(23,43,77,0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white; border-radius: var(--radius-lg);
    max-width: 480px; width: 90%; padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
}
.modal-icon.danger { background: rgba(229,62,62,0.1); color: var(--color-danger); }
.modal-icon.warning { background: rgba(245,158,11,0.1); color: var(--color-warning); }
.modal-icon.success { background: rgba(15,159,131,0.1); color: var(--color-accent); }

.modal-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.modal-body { color: var(--color-muted); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: center; }

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

/* ===== Alerts ===== */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.alert-success { background: rgba(15,159,131,0.08); color: var(--color-accent); border: 1px solid rgba(15,159,131,0.2); }
.alert-danger { background: rgba(229,62,62,0.08); color: var(--color-danger); border: 1px solid rgba(229,62,62,0.2); }
.alert-warning { background: rgba(245,158,11,0.08); color: var(--color-warning); border: 1px solid rgba(245,158,11,0.2); }
.alert-info { background: rgba(40,120,223,0.08); color: var(--color-cta); border: 1px solid rgba(40,120,223,0.2); }

/* ===== Bottom Navigation (Mobile) ===== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--color-border);
    height: var(--bottom-nav-height);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(23,43,77,0.06);
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px; font-size: 0.7rem; color: var(--color-muted);
    text-decoration: none; padding-top: 0.5rem;
}
.bottom-nav-item i { font-size: 1.2rem; }
.bottom-nav-item.active { color: var(--color-cta); }

/* ===== Floating Support Button ===== */
.support-fab {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 56px; height: 56px;
    background: var(--color-primary);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; box-shadow: var(--shadow-lg);
    cursor: pointer; z-index: 900;
    transition: transform 0.2s;
    border: none;
}
.support-fab:hover { transform: scale(1.08); }

/* ===== Avatar ===== */
.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-cta), var(--color-primary));
    color: white; display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}

.avatar-lg { width: 64px; height: 64px; font-size: 1.1rem; }

/* ===== Receipt Styles ===== */
.receipt {
    max-width: 420px; margin: 0 auto;
    background: white; padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.receipt-header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 2px dashed var(--color-border); }
.receipt-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
.receipt-row .label { color: var(--color-muted); }
.receipt-row .value { font-weight: 600; }

/* ===== Login / Auth Pages ===== */
.auth-wrapper {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    padding: 2rem; background: var(--color-soft-bg);
}
.auth-card {
    background: white; border-radius: var(--radius-lg);
    padding: 2.5rem; max-width: 440px; width: 100%;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon {
    width: 64px; height: 64px; margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cta));
    border-radius: var(--radius-lg); display: flex;
    align-items: center; justify-content: center;
    font-size: 1.75rem; color: white; font-weight: 700;
}

/* ===== Grid System ===== */
.row { display: flex; flex-wrap: wrap; margin: 0 -0.5rem; }
.col { flex: 1; padding: 0 0.5rem; }
.col-2 { width: 16.66%; padding: 0 0.5rem; }
.col-3 { width: 25%; padding: 0 0.5rem; }
.col-4 { width: 33.33%; padding: 0 0.5rem; }
.col-6 { width: 50%; padding: 0 0.5rem; }
.col-8 { width: 66.66%; padding: 0 0.5rem; }
.col-12 { width: 100%; padding: 0 0.5rem; }

.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.text-center { text-align: center; } .text-right { text-align: right; }
.w-100 { width: 100%; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1rem; padding-bottom: calc(1rem + var(--bottom-nav-height)); }
    .bottom-nav { display: flex; }
    .support-fab { bottom: calc(var(--bottom-nav-height) + 1rem); }
    h1 { font-size: 1.375rem; }
    .col-4, .col-6, .col-8 { width: 100%; }
    .col-3 { width: 50%; }
}

@media (max-width: 576px) {
    .col-3 { width: 100%; }
    .col-2 { width: 50%; }
    .auth-card { padding: 1.5rem; }
    .balance-card { padding: 1.5rem; }
    .balance-amount { font-size: 1.75rem; }
    .progress-stages { font-size: 0.7rem; }
    .otp-input { width: 40px; height: 50px; font-size: 1.25rem; }
    .pin-input { width: 48px; height: 58px; font-size: 1.5rem; }
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-cta);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Chat Widget ===== */
.chat-widget {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 360px; max-width: calc(100vw - 2rem);
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); z-index: 1500;
    display: none; flex-direction: column;
    max-height: 500px;
}
.chat-widget.open { display: flex; }
.chat-header {
    padding: 1rem 1.25rem; background: var(--color-primary);
    color: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; max-height: 320px; }
.chat-bubble { margin-bottom: 0.75rem; max-width: 80%; }
.chat-bubble.customer { margin-left: auto; }
.chat-bubble-admin .bubble-body, .chat-bubble-system .bubble-body { background: var(--color-light-grey); padding: 0.625rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; }
.chat-bubble.customer .bubble-body { background: var(--color-cta); color: white; padding: 0.625rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; }
.chat-input-area { padding: 0.75rem; border-top: 1px solid var(--color-border); display: flex; gap: 0.5rem; }
.chat-input-area input { flex: 1; }

/* ============================================================
   WhatsApp Chat Widget
   ============================================================ */
.whatsapp-widget {
    position: fixed;
    bottom: 1.5rem;
    z-index: 950;
}
.whatsapp-widget[style*="--wa-pos: left"] { left: 1.5rem; }
.whatsapp-widget[style*="--wa-pos: right"] { right: 1.5rem; }

.whatsapp-fab {
    width: 56px; height: 56px;
    background: #25D366;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.75rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 2;
}
.whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}
.whatsapp-fab-badge {
    position: absolute;
    top: -2px; right: -2px;
    width: 16px; height: 16px;
    background: #E53E3E;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}
.whatsapp-fab-badge::after {
    content: '1';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
}

.whatsapp-popup {
    position: absolute;
    bottom: 70px;
    width: 340px;
    max-width: calc(100vw - 3rem);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    animation: whatsappSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.whatsapp-widget[style*="--wa-pos: left"] .whatsapp-popup { left: 0; }
.whatsapp-widget[style*="--wa-pos: right"] .whatsapp-popup { right: 0; }

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

.whatsapp-popup-header {
    background: #075E54;
    padding: 1rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
}
.whatsapp-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: white;
    overflow: hidden;
}
.whatsapp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.whatsapp-close {
    background: transparent; border: none; color: white;
    font-size: 1.1rem; cursor: pointer; padding: 0.25rem;
    opacity: 0.7; transition: opacity 0.2s;
}
.whatsapp-close:hover { opacity: 1; }

.whatsapp-popup-body {
    padding: 1.25rem;
    background: #ECE5DD;
    min-height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath fill='%23d4cfc9' d='M20 0c0 5 0 10 0 10M0 20c5 0 10 0 10 0M20 20c0 5 0 10 0 10M20 20c5 0 10 0 10 0' opacity='0.1'/%3E%3C/svg%3E");
}
.whatsapp-bubble {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 0 10px 10px 10px;
    font-size: 0.9rem;
    color: var(--color-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    max-width: 85%;
}
.whatsapp-bubble-time {
    font-size: 0.7rem;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
    text-align: right;
}
.whatsapp-popup-footer {
    padding: 0.75rem;
    background: white;
    border-top: 1px solid var(--color-border);
}
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-whatsapp:hover { background: #1da851; color: white; }

/* ============================================================
   Language Translator Dropdown
   ============================================================ */
.translator-wrapper {
    position: relative;
}
.translator-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    display: none;
}
.translator-dropdown.show { display: block; }
.translator-header {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; gap: 0.5rem;
}

/* Google Translate widget styling overrides */
#google_translate_element { padding: 0.5rem; }
#google_translate_element .goog-te-gadget {
    font-family: var(--font-sans) !important;
    font-size: 0 !important;
}
#google_translate_element .goog-te-gadget .goog-te-combo {
    width: 100% !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.85rem !important;
    font-family: var(--font-sans) !important;
    color: var(--color-text) !important;
    background: white !important;
    cursor: pointer !important;
    outline: none !important;
}
#google_translate_element .goog-te-gadget .goog-te-combo:focus {
    border-color: var(--color-cta) !important;
}
#google_translate_element .goog-logo-link,
#google_translate_element .goog-te-gadget span {
    display: none !important;
}
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
    background: transparent !important;
    box-shadow: none !important;
}
/* Hide Google Translate top banner */
.goog-te-banner-frame.skiptranslate { display: none !important; }
.goog-te-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-balloon-frame { display: none !important; }

/* Mobile adjustments for widgets */
@media (max-width: 576px) {
    .whatsapp-popup { width: calc(100vw - 2rem); }
    .whatsapp-widget[style*="--wa-pos: left"] .whatsapp-popup,
    .whatsapp-widget[style*="--wa-pos: right"] .whatsapp-popup {
        left: 0; right: 0;
    }
    .translator-dropdown { right: -3rem; }
}
