/* ==============================================
   AEROFIELD — SIDE NAVIGATION BUTTONS
   Premium black filleted half-rectangles with
   golden gradient border + breathing animation.
   ============================================== */

/* ── Container ────────────────────────────── */
.side-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 900;
    pointer-events: auto;
}

.side-nav--left  { left: 0; }
.side-nav--right { right: 0; }

/* ── Button base ─────────────────────────── */
.side-nav__btn {
    position: relative;
    display: flex;
    align-items: center;
    width: 130px;
    height: 38px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    /* Golden gradient border */
    background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a);
    background-size: 250%;
    background-position: left;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                background-position 1s ease;
    /* Breathing pulse */
    animation: sideNavBreathe 4s ease-in-out infinite;
}

/* ── Inner face (black premium surface) ──── */
.side-nav__btn::before {
    content: '';
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.88);
    transition: background-color 0.4s ease;
    z-index: 1;
}

/* Left buttons: flat left edge, rounded right */
.side-nav--left .side-nav__btn {
    border-radius: 0 14px 14px 0;
    padding-left: 12px;
    justify-content: flex-start;
}

.side-nav--left .side-nav__btn::before {
    inset: 0 2px 2px 0;
    border-radius: 0 12px 12px 0;
}

/* Right buttons: flat right edge, rounded left — same layout as left */
.side-nav--right .side-nav__btn {
    border-radius: 14px 0 0 14px;
    padding-left: 12px;
    padding-right: 0;
    justify-content: flex-start;
    flex-direction: row;
}

.side-nav--right .side-nav__btn::before {
    inset: 2px 0 2px 2px;
    border-radius: 12px 0 0 12px;
}

/* ── Icon ────────────────────────────────── */
.side-nav__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: #ffd277;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 1;
    transition: opacity 0.3s ease, stroke 0.3s ease;
    position: relative;
    z-index: 2;
}

/* ── Label ───────────────────────────────── */
.side-nav__label {
    font-family: var(--font-ui, 'Rajdhani', sans-serif);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffd277;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.25s ease 0.1s;
    position: relative;
    z-index: 2;
}

.side-nav--left .side-nav__label  { margin-left: 8px; }
.side-nav--right .side-nav__label { margin-left: 8px; }

/* ── Breathing animation ─────────────────── */
@keyframes sideNavBreathe {
    0%   { background-position: left;  box-shadow: 0 0 6px rgba(255, 210, 119, 0.05); }
    50%  { background-position: right; box-shadow: 0 0 18px rgba(255, 210, 119, 0.15); }
    100% { background-position: left;  box-shadow: 0 0 6px rgba(255, 210, 119, 0.05); }
}

/* Stagger the breathing so they don't all pulse in sync */
.side-nav__btn:nth-child(1) { animation-delay: 0s; }
.side-nav__btn:nth-child(2) { animation-delay: 1s; }
.side-nav__btn:nth-child(3) { animation-delay: 2s; }
.side-nav__btn:nth-child(4) { animation-delay: 3s; }

/* ── Hover state ─────────────────────────── */
.side-nav__btn:hover {
    background-position: right;
    animation: none;
    box-shadow:
        0 0 14px rgba(255, 210, 119, 0.2),
        0 0 40px rgba(255, 210, 119, 0.08);
}

.side-nav__btn:hover::before {
    background-color: rgba(0, 0, 0, 0.70);
}

/* ── Active / press state ────────────────── */
.side-nav__btn:active {
    transform: scale(0.95);
}

/* ── Slide-in on page load ───────────────── */
@keyframes sideNavSlideLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes sideNavSlideRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.side-nav--left .side-nav__btn {
    animation: sideNavSlideLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) both,
               sideNavBreathe 4s ease-in-out infinite 1.2s;
}

.side-nav--right .side-nav__btn {
    animation: sideNavSlideRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) both,
               sideNavBreathe 4s ease-in-out infinite 1.2s;
}

.side-nav--left  .side-nav__btn:nth-child(1) { animation-delay: 0.6s, 1.6s; }
.side-nav--left  .side-nav__btn:nth-child(2) { animation-delay: 0.72s, 2.6s; }
.side-nav--left  .side-nav__btn:nth-child(3) { animation-delay: 0.84s, 3.6s; }
.side-nav--left  .side-nav__btn:nth-child(4) { animation-delay: 0.96s, 4.6s; }
.side-nav--right .side-nav__btn:nth-child(1) { animation-delay: 0.6s, 1.8s; }
.side-nav--right .side-nav__btn:nth-child(2) { animation-delay: 0.72s, 2.8s; }
.side-nav--right .side-nav__btn:nth-child(3) { animation-delay: 0.84s, 3.8s; }
.side-nav--right .side-nav__btn:nth-child(4) { animation-delay: 0.96s, 4.8s; }

/* ── Locked state ────────────────────────── */
.side-nav__btn--locked {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.35;
    filter: grayscale(0.5);
}

.side-nav__btn--locked .side-nav__icon {
    stroke: rgba(255, 210, 119, 0.4);
}

.side-nav__btn--locked .side-nav__label {
    color: rgba(255, 210, 119, 0.4);
}

/* ── Responsive: hide on small screens ───── */
@media (max-width: 768px) {
    .side-nav { display: none; }
}
