/* ============================================================
   GOETIVFES Phase 01 — Frontend CSS
   Global Operational Existing Template Injection and
   Visible Frontend Evolution System
   Light-first | All hex in :root | Sky-blue primary
   ============================================================ */

:root {
    /* Core palette — sky-blue primary */
    --goetivfes-sky:         #4a8ab0;
    --goetivfes-sky-light:   #e8f2f8;
    --goetivfes-sky-mid:     #c2dded;
    --goetivfes-teal:        #3a9a8a;
    --goetivfes-mint:        #e8f7f3;
    --goetivfes-violet:      #7a6a9a;
    --goetivfes-orange:      #d4845a;
    --goetivfes-silver:      #9aaab8;
    --goetivfes-surface:     #ffffff;
    --goetivfes-bg:          #fafafa;
    --goetivfes-text:        #2c3e50;
    --goetivfes-muted:       #6b7c8d;
    --goetivfes-border:      #e0e8f0;

    /* Atmospheric gradients */
    --goetivfes-grad-inject:    linear-gradient(135deg, #4a8ab0 0%, #3a9a8a 100%);
    --goetivfes-grad-atmospheric: linear-gradient(135deg, #3a9a8a 0%, #5ab8a8 100%);
    --goetivfes-grad-calm:      linear-gradient(135deg, #9aaab8 0%, #b8c8d8 100%);
    --goetivfes-grad-template:  linear-gradient(135deg, #4a8ab0 0%, #7a6a9a 100%);
    --goetivfes-grad-evo:       linear-gradient(135deg, #d4845a 0%, #4a8ab0 100%);

    /* Ecosystem mode gradients */
    --goetivfes-mode-akekart: linear-gradient(135deg, #4a8ab0 0%, #2a6a90 100%);
    --goetivfes-mode-origin:  linear-gradient(135deg, #3a9a8a 0%, #2a7a6a 100%);
    --goetivfes-mode-build:   linear-gradient(135deg, #d4845a 0%, #b4643a 100%);
    --goetivfes-mode-setup:   linear-gradient(135deg, #7a6a9a 0%, #5a4a7a 100%);
    --goetivfes-mode-service: linear-gradient(135deg, #5a9a7a 0%, #3a7a5a 100%);
    --goetivfes-mode-yatra:   linear-gradient(135deg, #2a4a80 0%, #1a3a60 100%);
    --goetivfes-mode-rent:    linear-gradient(135deg, #5a9a7a 0%, #3a9a8a 100%);

    /* Calm buyer gradient stops */
    --goetivfes-calm-white: #f8fbff;
    --goetivfes-calm-green: #f0f8f4;

    /* GoodScore colors */
    --goetivfes-gs-high:   #3a9a8a;
    --goetivfes-gs-mid:    #d4845a;
    --goetivfes-gs-low:    #c0392b;

    /* Category atmospheric backgrounds */
    --goetivfes-cat-akekart-bg:    #f0f6fb;
    --goetivfes-cat-akekart-accent: #4a8ab0;
    --goetivfes-cat-origin-bg:     #f0faf8;
    --goetivfes-cat-origin-accent:  #3a9a8a;
    --goetivfes-cat-build-bg:      #fdf4ef;
    --goetivfes-cat-build-accent:   #d4845a;
    --goetivfes-cat-setup-bg:      #f5f0fb;
    --goetivfes-cat-setup-accent:   #7a6a9a;
    --goetivfes-cat-service-bg:    #f0faf5;
    --goetivfes-cat-service-accent: #5a9a7a;
    --goetivfes-cat-yatra-bg:      #f0f2fb;
    --goetivfes-cat-yatra-accent:   #2a4a80;
    --goetivfes-cat-rent-bg:       #f0fbf4;
    --goetivfes-cat-rent-accent:    #5a9a7a;
}

/* ============================================================
   INJECTION BAR — template_injection_bar
   ============================================================ */

.goetivfes-injection-bar {
    background: var(--goetivfes-surface);
    border: 1px solid var(--goetivfes-border);
    border-left: 3px solid var(--goetivfes-sky);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--goetivfes-muted);
    margin: 8px 0;
}

.goetivfes-injection-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 20px);
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.goetivfes-injection-bar__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--goetivfes-sky);
}

.goetivfes-injection-bar__score-badge {
    font-size: 9px;
    font-weight: 600;
    color: var(--goetivfes-sky);
    line-height: 1;
}

.goetivfes-injection-bar__label {
    font-size: 11px;
    color: var(--goetivfes-muted);
    letter-spacing: 0.3px;
}

/* ============================================================
   ATMOSPHERIC RIBBON — atmospheric_frontend_ribbon
   ============================================================ */

.goetivfes-atmospheric-ribbon {
    background: var(--goetivfes-mint);
    border: 1px solid var(--goetivfes-sky-mid);
    border-left: 3px solid var(--goetivfes-teal);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.goetivfes-atmospheric-ribbon__icon {
    color: var(--goetivfes-teal);
    flex-shrink: 0;
}

.goetivfes-atmospheric-ribbon__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.goetivfes-atmospheric-ribbon__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--goetivfes-teal);
}

.goetivfes-atmospheric-ribbon__score {
    font-size: 10px;
    color: var(--goetivfes-muted);
}

/* ============================================================
   CONTINUITY INDICATOR — template_continuity_indicator
   ============================================================ */

.goetivfes-continuity-indicator {
    background: var(--goetivfes-surface);
    border: 1px solid var(--goetivfes-border);
    border-left: 3px solid var(--goetivfes-violet);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.goetivfes-continuity-indicator__icon {
    color: var(--goetivfes-violet);
    flex-shrink: 0;
}

.goetivfes-continuity-indicator__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.goetivfes-continuity-indicator__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--goetivfes-violet);
}

.goetivfes-continuity-indicator__score {
    font-size: 10px;
    color: var(--goetivfes-muted);
}

/* ============================================================
   CALM FRONTEND — calm_frontend_continuity (BUYER)
   ============================================================ */

.goetivfes-calm-frontend {
    background: linear-gradient(135deg, var(--goetivfes-calm-white) 0%, var(--goetivfes-calm-green) 100%);
    border: 1px solid var(--goetivfes-sky-mid);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.goetivfes-calm-frontend__icon {
    color: var(--goetivfes-sky);
    flex-shrink: 0;
}

.goetivfes-calm-frontend__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.goetivfes-calm-frontend__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--goetivfes-text);
}

.goetivfes-calm-frontend__locale {
    font-size: 11px;
    color: var(--goetivfes-muted);
}

.goetivfes-calm-frontend__score {
    font-size: 18px;
    font-weight: 700;
    color: var(--goetivfes-sky);
    min-width: 36px;
    text-align: right;
}

/* ============================================================
   HEADER EVOLUTION LAYER
   ============================================================ */

.goetivfes-header-evo {
    background: var(--goetivfes-bg);
    border-top: 1px solid var(--goetivfes-border);
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.goetivfes-header-evo .goetivfes-injection-bar,
.goetivfes-header-evo .goetivfes-atmospheric-ribbon,
.goetivfes-header-evo .goetivfes-continuity-indicator {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* ============================================================
   HOMEPAGE EVOLUTION LAYER
   ============================================================ */

.goetivfes-homepage-evo {
    padding: 16px;
    background: var(--goetivfes-bg);
    border-top: 1px solid var(--goetivfes-border);
}

.goetivfes-homepage-evo__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.goetivfes-homepage-evo__inner .goetivfes-injection-bar,
.goetivfes-homepage-evo__inner .goetivfes-atmospheric-ribbon,
.goetivfes-homepage-evo__inner .goetivfes-continuity-indicator {
    margin: 0;
}

.goetivfes-homepage-evo__mode-strip {
    max-width: 1200px;
    margin: 12px auto 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.goetivfes-mode-section--akekart { background: var(--goetivfes-cat-akekart-bg); color: var(--goetivfes-cat-akekart-accent); }
.goetivfes-mode-section--origin  { background: var(--goetivfes-cat-origin-bg);  color: var(--goetivfes-cat-origin-accent);  }
.goetivfes-mode-section--build   { background: var(--goetivfes-cat-build-bg);   color: var(--goetivfes-cat-build-accent);   }
.goetivfes-mode-section--setup   { background: var(--goetivfes-cat-setup-bg);   color: var(--goetivfes-cat-setup-accent);   }
.goetivfes-mode-section--service { background: var(--goetivfes-cat-service-bg); color: var(--goetivfes-cat-service-accent); }
.goetivfes-mode-section--yatra   { background: var(--goetivfes-cat-yatra-bg);   color: var(--goetivfes-cat-yatra-accent);   }
.goetivfes-mode-section--rent    { background: var(--goetivfes-cat-rent-bg);    color: var(--goetivfes-cat-rent-accent);    }

/* ============================================================
   PRODUCT CARD EVOLUTION
   ============================================================ */

.goetivfes-card-evo {
    border-top: 1px solid var(--goetivfes-border);
    padding: 8px 12px;
    background: var(--goetivfes-bg);
}

.goetivfes-card-evo__goodscore {
    display: flex;
    align-items: center;
    gap: 8px;
}

.goetivfes-card-evo__goodscore-label {
    font-size: 10px;
    color: var(--goetivfes-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.goetivfes-card-evo__goodscore-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--goetivfes-teal);
}

.goetivfes-card-evo__goodscore-bar {
    flex: 1;
    height: 3px;
    background: var(--goetivfes-border);
    border-radius: 2px;
    overflow: hidden;
}

.goetivfes-card-evo__goodscore-fill {
    height: 100%;
    background: var(--goetivfes-grad-inject);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ============================================================
   PRODUCT DETAIL EVOLUTION
   ============================================================ */

.goetivfes-product-detail-evo {
    padding: 12px 0;
    border-top: 1px solid var(--goetivfes-border);
    margin-top: 16px;
}

/* ============================================================
   PROFILE EVOLUTION LAYER
   ============================================================ */

.goetivfes-profile-evo {
    padding: 12px 0;
    border-bottom: 1px solid var(--goetivfes-border);
    margin-bottom: 16px;
}

.goetivfes-profile-evo__mode-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.goetivfes-profile-evo__mode-chip {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--goetivfes-border);
    background: var(--goetivfes-surface);
    font-size: 11px;
    font-weight: 500;
    color: var(--goetivfes-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.goetivfes-profile-evo__mode-chip--active {
    background: var(--goetivfes-grad-inject);
    color: var(--goetivfes-surface);
    border-color: transparent;
}

/* ============================================================
   DASHBOARD EVOLUTION LAYER
   ============================================================ */

.goetivfes-dashboard-evo {
    background: var(--goetivfes-surface);
    border: 1px solid var(--goetivfes-border);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.goetivfes-dashboard-evo__header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--goetivfes-border);
}

.goetivfes-dashboard-evo__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--goetivfes-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goetivfes-dashboard-evo__surfaces {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================
   MOBILE EVOLUTION LAYER
   ============================================================ */

.goetivfes-mobile-evo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
}

.goetivfes-mobile-evo__mode-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--goetivfes-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.goetivfes-mobile-evo__mode-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--goetivfes-sky);
}
.goetivfes-mobile-evo__mode-dot--akekart { background: var(--goetivfes-cat-akekart-accent); }
.goetivfes-mobile-evo__mode-dot--origin  { background: var(--goetivfes-cat-origin-accent);  }
.goetivfes-mobile-evo__mode-dot--build   { background: var(--goetivfes-cat-build-accent);   }
.goetivfes-mobile-evo__mode-dot--setup   { background: var(--goetivfes-cat-setup-accent);   }

/* ============================================================
   FOOTER EVOLUTION LAYER
   ============================================================ */

.goetivfes-footer-evo {
    border-top: 1px solid var(--goetivfes-border);
    padding: 10px 16px;
    background: var(--goetivfes-bg);
}

/* ============================================================
   CATEGORY ATMOSPHERE
   ============================================================ */

.goetivfes-category-evo {
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.goetivfes-category-evo__atmosphere {
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.3;
}

/* ============================================================
   DARK MODE — secondary
   ============================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --goetivfes-surface:   #1a2232;
        --goetivfes-bg:        #141c2a;
        --goetivfes-text:      #d0dde8;
        --goetivfes-muted:     #7a8fa0;
        --goetivfes-border:    #2a3a4a;
        --goetivfes-sky-light: #1e3a50;
        --goetivfes-sky-mid:   #2a4a60;
        --goetivfes-mint:      #1a2e28;
        --goetivfes-cat-akekart-bg:    #1a2535;
        --goetivfes-cat-origin-bg:     #1a2e28;
        --goetivfes-cat-build-bg:      #2a1f18;
        --goetivfes-cat-setup-bg:      #201a2e;
        --goetivfes-cat-service-bg:    #1a2a22;
        --goetivfes-cat-yatra-bg:      #181e30;
        --goetivfes-cat-rent-bg:       #1a2d24;
    }
}

/* ============================================================
   RESPONSIVE ≤600px
   ============================================================ */

@media (max-width: 600px) {
    .goetivfes-header-evo { flex-direction: column; padding: 6px 12px; }
    .goetivfes-homepage-evo__inner { grid-template-columns: 1fr; }
    .goetivfes-calm-frontend { flex-direction: column; align-items: flex-start; }
    .goetivfes-calm-frontend__score { align-self: flex-end; }
    .goetivfes-profile-evo__mode-strip { gap: 6px; }
    .goetivfes-profile-evo__mode-chip { padding: 4px 10px; font-size: 10px; }
}


/* ============================================================
   CORE/FLOW ECOSYSTEM IDENTITY CHIPS — product card trust strip
   (synced with header.php ake-eco-tab system — v2 white-on-blue underline tabs)
   ============================================================ */

/* Card GoodScore strip — enhanced visual weight */
.goetivfes-card-evo {
    border-top: 1px solid var(--goetivfes-border);
    padding: 7px 10px;
    background: linear-gradient(180deg, #fafcff 0%, #f8fafc 100%);
    border-radius: 0 0 8px 8px;
}

.goetivfes-card-evo__goodscore {
    display: flex;
    align-items: center;
    gap: 7px;
}

.goetivfes-card-evo__goodscore-label {
    font-size: 9.5px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.goetivfes-card-evo__goodscore-value {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--goetivfes-teal);
    min-width: 22px;
}

/* Score-based color: high ≥80, mid 60-79, low <60 */
[data-goodscore]:not([data-goodscore="0"]) {
    color: var(--goetivfes-teal); /* default = good */
}

.goetivfes-card-evo__goodscore-bar {
    flex: 1;
    height: 4px;
    background: #e2ecf8;
    border-radius: 3px;
    overflow: hidden;
}

.goetivfes-card-evo__goodscore-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a9a8a 0%, #2874f0 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ── PROFILE MODE CHIPS — enhanced for CORE/FLOW ── */
.goetivfes-profile-evo {
    padding: 14px 0 10px;
    border-bottom: 1px solid #e2ecf8;
    margin-bottom: 20px;
}

.goetivfes-profile-evo__mode-strip {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.goetivfes-profile-evo__mode-strip::before {
    content: 'CORE';
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-right: 2px;
}

.goetivfes-profile-evo__mode-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: white;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.18s ease;
    letter-spacing: 0.3px;
    font-family: 'Poppins', sans-serif;
}

.goetivfes-profile-evo__mode-chip[data-mode="akekart"]:hover,
.goetivfes-profile-evo__mode-chip[data-mode="akekart"].goetivfes-profile-evo__mode-chip--active {
    background: #eff6ff; border-color: #bfdbfe; color: #2874f0;
    box-shadow: 0 2px 8px rgba(40,116,240,0.12); font-weight: 800;
}

.goetivfes-profile-evo__mode-chip[data-mode="origin"]:hover,
.goetivfes-profile-evo__mode-chip[data-mode="origin"].goetivfes-profile-evo__mode-chip--active {
    background: #f0fdf4; border-color: #a7f3d0; color: #059669;
    box-shadow: 0 2px 8px rgba(5,150,105,0.12); font-weight: 800;
}

.goetivfes-profile-evo__mode-chip[data-mode="build"]:hover,
.goetivfes-profile-evo__mode-chip[data-mode="build"].goetivfes-profile-evo__mode-chip--active {
    background: #fffbeb; border-color: #fde68a; color: #d97706;
    box-shadow: 0 2px 8px rgba(217,119,6,0.12); font-weight: 800;
}

.goetivfes-profile-evo__mode-chip[data-mode="setup"]:hover,
.goetivfes-profile-evo__mode-chip[data-mode="setup"].goetivfes-profile-evo__mode-chip--active {
    background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124,58,237,0.12); font-weight: 800;
}

/* ── DASHBOARD INTELLIGENCE STRIP ── */
.goetivfes-dashboard-evo {
    background: linear-gradient(135deg, #f8faff 0%, #f0f6ff 100%);
    border: 1px solid #dbeafe;
    border-left: 3px solid #2874f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.goetivfes-dashboard-evo__header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2ecf8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.goetivfes-dashboard-evo__title {
    font-size: 11px;
    font-weight: 700;
    color: #2874f0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.goetivfes-dashboard-evo__title::before {
    content: '●';
    font-size: 8px;
    margin-right: 6px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.goetivfes-dashboard-evo__surfaces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.goetivfes-dashboard-evo__surfaces .goetivfes-injection-bar,
.goetivfes-dashboard-evo__surfaces .goetivfes-atmospheric-ribbon,
.goetivfes-dashboard-evo__surfaces .goetivfes-continuity-indicator {
    margin: 0;
}

/* ── MOBILE BOTTOM NAV — ecosystem identity ── */
.goetivfes-mobile-evo {
    position: fixed;
    bottom: 60px; /* above mob-nav */
    left: 0; right: 0;
    padding: 4px 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    border-top: 1px solid #e2ecf8;
    display: none; /* shown only when ecosystem mode != akekart */
    align-items: center;
    gap: 8px;
    z-index: 999;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

.goetivfes-mobile-evo.is-visible {
    display: flex;
}

.goetivfes-mobile-evo__mode-dot {
    width: 7px; height: 7px; border-radius: 50%;
    flex-shrink: 0;
}

/* ── ATMOSPHERIC CONTINUITY — visual sync pass ── */
/* Ensure all GOETIVFES surfaces have smooth reveal animation */
.goetivfes-header-evo,
.goetivfes-homepage-evo,
.goetivfes-product-detail-evo,
.goetivfes-footer-evo,
.goetivfes-card-evo {
    animation: goetivfes-reveal 0.3s ease-out;
}

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

/* Override dark mode for GoEtiVFES surfaces (light-first always) */
@media (prefers-color-scheme: dark) {
    .goetivfes-card-evo { background: rgba(248,250,255,0.08); border-top-color: rgba(226,236,248,0.2); }
    .goetivfes-card-evo__goodscore-label { color: #94a3b8; }
    .goetivfes-card-evo__goodscore-bar { background: rgba(226,236,248,0.2); }
}
