/* ============================================
   Shared component styles
   Used by nav.js (top nav) and analytics.js (consent banner).
   ============================================ */

/* ---- Top nav (nav.js) ---- */
#mainNav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark-slate);
    color: #fff;
    height: 56px;
    padding: 0 var(--space-5);
    font-family: var(--font-family);
    box-sizing: border-box;
}
.mn-left,
.mn-center,
.mn-right {
    display: flex;
    align-items: center;
}
.mn-left   { flex: 0 0 auto; }
.mn-center { flex: 1 1 auto; justify-content: center; }
.mn-right  { flex: 0 0 auto; gap: var(--space-3); }

.mn-brand {
    color: var(--brand-green);
    font-weight: bold;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
}
.mn-brand:hover { opacity: 0.85; }

.mn-breadcrumb {
    font-size: var(--text-sm);
    color: #94a3b8;
    white-space: nowrap;
}
.mn-sep { margin: 0 6px; opacity: 0.5; }

.mn-email {
    color: #94a3b8;
    font-size: 0.78rem;
    white-space: nowrap;
}
.mn-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
    transition: color 0.15s;
}
.mn-link:hover { color: var(--brand-green); }

@media (max-width: 768px) {
    #mainNav {
        height: 48px;
        padding: 0 var(--space-4);
    }
    .mn-center { display: none; }
    .mn-brand { font-size: 1.05rem; }
    .mn-link,
    .mn-email { font-size: 0.75rem; }
}
@media print {
    #mainNav { display: none; }
}

/* ---- Staging ribbon (staging-banner.js) ----
   Renders only on wings.agriterra.io. Fixed top-right, non-interactive,
   semi-transparent so it doesn't fully obscure underlying UI. */
#staging-banner {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 10001;
    padding: 4px 10px;
    border: 2px solid var(--brand-green);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.85);
    color: var(--brand-green);
    font-family: var(--font-family);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
@media print {
    #staging-banner { display: none; }
}

/* ---- Cookie consent banner (analytics.js) ---- */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #fff;
    padding: var(--space-3) 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    z-index: 10000;
    font-size: 0.85rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}
.cookie-consent__link {
    color: #4ade80;
    text-decoration: underline;
}
.cookie-consent__actions {
    display: flex;
    gap: var(--space-2);
}
.cookie-consent__btn {
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}
.cookie-consent__btn--accept {
    background: #4ade80;
    color: #1e293b;
}
.cookie-consent__btn--decline {
    background: transparent;
    color: #94a3b8;
    border: 1px solid var(--text-muted);
    font-weight: normal;
}
