/* ========================================
   BitFit24 Design System
   ======================================== */

/* --- CSS Variables (Light Theme) --- */

:root {
    /* Base Scale */
    --base-0: #000000;
    --base-1: #333333;
    --base-2: #555555;
    --base-3: #909090;
    --base-4: #A7A7A7;
    --base-5: #D0D0D0;
    --base-6: #DFE0E3;
    --base-7: #F0F0F0;
    --base-8: #FFFFFF;
    --base-black-fixed: #000000;
    --base-white-fixed: #FFFFFF;

    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F6F8FA;
    --bg-tertiary: #F1F4F6;
    --bg-navigation: #FFFFFF;
    --bg-separator: #E2E2E2;
    --bg-separator-secondary: #F0F0F0;
    --bg-layer: #FFFFFF;

    /* Accent — Main */
    --accent-primary: #0075FF;
    --accent-primary-alt: #1F86FF;
    --accent-success: #1BCE7B;
    --accent-link: #0154C8;
    --accent-warning: #FAA72C;
    --accent-warning-solid: #E89B06;
    --accent-alert: #FF5752;

    /* Soft Blue */
    --soft-blue-1: #C4E6FF;
    --soft-blue-2: #E6F4FF;
    --soft-blue-3: #EDF7FF;

    /* Soft Green */
    --soft-green-1: #A7FAD3;
    --soft-green-2: #CAFFE7;
    --soft-green-3: #E7FFF5;

    /* Soft Orange */
    --soft-orange-1: #FFEBA6;
    --soft-orange-2: #FFF4D6;
    --soft-orange-3: #FFF9E3;

    /* Soft Red */
    --soft-red-1: #FFCDCC;
    --soft-red-2: #FFE8E8;
    --soft-red-3: #FFF0F0;

    /* Soft Violet */
    --soft-violet-1: #F1E0FF;
    --soft-violet-2: #F6ECFF;
    --soft-violet-3: #FBF6FF;

    /* Soft Grey */
    --soft-grey-1: #F0F0F0;
    --soft-grey-2: #FCFCFD;

    /* Soft Element (text on soft bg) */
    --soft-element-blue: #0154C8;
    --soft-element-green: #02BB9A;
    --soft-element-orange: #A56300;
    --soft-element-red: #C21B16;
    --soft-element-violet: #B15EF5;

    /* Soft Border */
    --soft-border-blue: #88C8F8;
    --soft-border-red: #FEA8A6;
    --soft-border-green: #3BF39C;

    /* Brand */
    --brand-blue: #2FC6F6;
    --brand-green: #BBED21;

    /* Extra (charts, avatars) */
    --extra-orange: #E88C02;
    --extra-aqua: #37C5D8;
    --extra-pink: #F85E9E;
    --extra-grass: #24B547;
    --extra-brown: #B89238;
    --extra-darkblue: #0091E3;

    /* Tech */
    --tech-push: rgba(0, 0, 0, 0.04);
    --tech-focus: rgba(0, 0, 0, 0.05);
    --tech-overlay: rgba(0, 0, 0, 0.25);

    /* Spacing */
    --space-2xs: 2px;
    --space-xs: 4px;
    --space-s: 6px;
    --space-m: 8px;
    --space-l: 10px;
    --space-xl: 12px;
    --space-xl2: 14px;
    --space-xl3: 18px;
    --space-xl4: 24px;
    --padding-lr: 18px;
    --padding-lr-more: 24px;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-s: 6px;
    --radius-m: 8px;
    --radius-l: 12px;
    --radius-xl: 18px;
    --radius-xl2: 36px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-glass: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* --- Typography Classes --- */

/* Headings */
.text-h1 { font-size: 25px; line-height: 30px; font-weight: 500; }
.text-h1-accent { font-size: 25px; line-height: 30px; font-weight: 600; }
.text-h2 { font-size: 21px; line-height: 1.4; font-weight: 500; }
.text-h2-accent { font-size: 21px; line-height: 1.4; font-weight: 600; }
.text-h3 { font-size: 19px; line-height: 22px; font-weight: 500; }
.text-h3-accent { font-size: 19px; line-height: 22px; font-weight: 600; }
.text-h4 { font-size: 17px; line-height: 20px; font-weight: 500; }
.text-h4-accent { font-size: 17px; line-height: 20px; font-weight: 600; }
.text-h5 { font-size: 15px; line-height: 1.4; font-weight: 500; }
.text-h5-accent { font-size: 15px; line-height: 1.4; font-weight: 600; }

/* Body */
.text-body-1 { font-size: 19px; line-height: 1.4; font-weight: 400; }
.text-body-1-accent { font-size: 19px; line-height: 1.4; font-weight: 500; }
.text-body-2 { font-size: 17px; line-height: 1.4; font-weight: 400; }
.text-body-2-accent { font-size: 17px; line-height: 1.4; font-weight: 500; }
.text-body-3 { font-size: 16px; line-height: 19px; font-weight: 400; }
.text-body-3-accent { font-size: 16px; line-height: 19px; font-weight: 500; }
.text-body-4 { font-size: 15px; line-height: 18px; font-weight: 400; }
.text-body-4-accent { font-size: 15px; line-height: 18px; font-weight: 500; }
.text-body-5 { font-size: 13px; line-height: 16px; font-weight: 400; }
.text-body-5-accent { font-size: 13px; line-height: 16px; font-weight: 500; }
.text-body-6 { font-size: 12px; line-height: 14px; font-weight: 400; }
.text-body-6-accent { font-size: 12px; line-height: 14px; font-weight: 500; }
.text-body-7 { font-size: 10px; line-height: 12px; font-weight: 400; }
.text-body-7-accent { font-size: 10px; line-height: 12px; font-weight: 500; }

/* Capital */
.text-capital { font-size: 10px; line-height: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.75px; }
.text-capital-accent { font-size: 10px; line-height: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.75px; }

/* --- Utility Classes --- */

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

/* Details/Summary — hide default marker */
details summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }

/* ========================================
   Login Page — Split-screen
   ======================================== */

/* Hide nav & reset main on login page */
body:has(.login-page) > nav { display: none; }
body:has(.login-page) > main {
    max-width: none;
    padding: 0;
    margin: 0;
    position: relative;
}
body:has(.login-page) {
    background: #FAFAFA;
}

/* Flash messages float over login page */
body:has(.login-page) > main > .mb-4 {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 400px;
    width: calc(100% - 32px);
}

/* Main layout */
.login-page {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* --- Left panel: Visual / Brand --- */
.login-visual {
    position: relative;
    flex: 0 0 65%;
    overflow: hidden;
    background-color: #1a1a2e;
}

/* Slideshow */
.login-slideshow {
    position: absolute;
    inset: 0;
}

.login-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: login-fade 15s infinite;
}

.login-slide:nth-child(2) { animation-delay: 5s; }
.login-slide:nth-child(3) { animation-delay: 10s; }

@keyframes login-fade {
    0%   { opacity: 0; }
    5%   { opacity: 1; }
    33%  { opacity: 1; }
    38%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Dark overlay */
.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    z-index: 1;
}

/* Content over photos */
.login-visual-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    color: white;
}

/* Logo on visual panel */
.login-logo {
    margin-bottom: 40px;
}

.login-logo svg {
    height: 40px;
    display: block;
}

.login-logo-subtitle {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 16px;
    opacity: 0.7;
}

/* Feature cards grid */
.login-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.login-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    animation: login-fadeIn 0.6s ease-out both;
}

.login-feature-card:nth-child(2) { animation-delay: 0.1s; }
.login-feature-card:nth-child(3) { animation-delay: 0.2s; }
.login-feature-card:nth-child(4) { animation-delay: 0.3s; }

.login-feature-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.login-feature-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.login-feature-card p {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
}

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

/* --- Right panel: Auth --- */
.login-auth {
    flex: 0 0 35%;
    background: #FAFAFA;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-auth-content {
    text-align: center;
    padding: 48px 40px;
    max-width: 360px;
    width: 100%;
}

.login-auth-logo {
    margin-bottom: 32px;
}

.login-auth-logo svg {
    height: 32px;
    display: inline-block;
}

.login-auth-title {
    font-size: 25px;
    line-height: 30px;
    font-weight: 600;
    color: var(--base-0);
    margin-bottom: 8px;
}

.login-auth-subtitle {
    font-size: 15px;
    line-height: 18px;
    color: var(--base-3);
    margin-bottom: 40px;
}

/* CTA button */
.login-cta {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-primary), #0060D0);
    color: white;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 117, 255, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 117, 255, 0.4);
}

.login-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 117, 255, 0.3);
}

/* Footer */
.login-auth-footer {
    padding-bottom: 24px;
    font-size: 12px;
    line-height: 14px;
    color: var(--base-4);
}

/* --- Login Responsive --- */

/* Tablet */
@media (max-width: 1024px) {
    .login-visual { flex: 0 0 55%; }
    .login-auth   { flex: 0 0 45%; }
    .login-features { grid-template-columns: 1fr; }
    .login-visual-content { padding: 32px; }
}

/* Mobile */
@media (max-width: 768px) {
    .login-page { flex-direction: column; }
    .login-visual {
        flex: none;
        height: 45vh;
        min-height: 280px;
    }
    .login-auth {
        flex: 1;
        min-height: auto;
    }
    .login-features { display: none; }
    .login-visual-content { padding: 24px; }
    .login-auth-content { padding: 32px 24px; }
    .login-logo { margin-bottom: 0; }
}

/* ========================================
   Activity Card — Actions bar
   ======================================== */
.activity-actions [id^="like-section"] {
    margin-top: 0;
}

/* ========================================
   Activity Popup
   ======================================== */

/* Desktop: scale + fade */
.popup-panel {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.popup-open .popup-panel {
    opacity: 1;
    transform: scale(1);
}

/* Mobile (< 640px): slide from bottom */
@media (max-width: 639px) {
    .popup-panel {
        opacity: 1;
        transform: translateY(100%);
        transition: transform 300ms ease-out;
    }
    .popup-open .popup-panel {
        transform: translateY(0);
    }
}

/* Backdrop fade */
.popup-backdrop {
    opacity: 0;
    transition: opacity 200ms ease-out;
}
.popup-open .popup-backdrop {
    opacity: 1;
}

/* Body scroll lock */
body.popup-body-lock {
    overflow: hidden;
}

/* Submit button loading state */
.popup-panel [disabled] .btn-text { display: none; }
.popup-panel [disabled] .btn-loading { display: inline !important; }

/* Reaction bounce animation */
@keyframes reaction-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.reaction-bounce { animation: reaction-bounce 200ms ease-out; }
