/* Vagtonia Login Page Styles
 * Injected via custom/header.tmpl -- ONLY targets the signin page.
 * Does NOT interfere with Forgejo's built-in themes.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== SIGN-IN PAGE ONLY ===== */

/* Hide navbar and footer on signin */
.page-content.user.signin~footer.page-footer,
body:has(.page-content.user.signin) #navbar,
body:has(.page-content.user.signin) footer.page-footer {
    display: none !important;
}

/* Hide the ROOT_URL warning on signin */
body:has(.page-content.user.signin) .ui.negative.message,
body:has(.page-content.user.signin) .ui.warning.message {
    display: none !important;
}

/* Full-screen centered login */
body:has(.page-content.user.signin) .full.height {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.page-content.user.signin {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* Ambient gradients */
.page-content.user.signin::before,
.page-content.user.signin::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.page-content.user.signin::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh;
}

.page-content.user.signin::after {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 60vh;
}

/* --- Vagtonia login wrapper --- */
.vagtonia-login-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    margin: 0 auto;
}

.vagtonia-logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.vagtonia-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12rem;
    height: 8rem;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.vagtonia-logo-box .vagtonia-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vagtonia-login-wrapper h1 {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    margin: 0 0 0.75rem 0 !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    text-align: center !important;
}

.vagtonia-login-wrapper>.vagtonia-logo-container>p {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    margin: 0;
    text-align: center;
}

/* Hide default Forgejo header inside our wrapper */
.vagtonia-login-wrapper h4.ui.top.attached.header,
.vagtonia-login-wrapper h4.ui.top.attached.header.center {
    display: none !important;
}

/* Card */
.vagtonia-login-wrapper .ui.container.fluid {
    width: 100% !important;
}

.vagtonia-login-wrapper .ui.attached.segment {
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    margin: 0 !important;
}

/* Form inputs */
.vagtonia-login-wrapper .ui.form input[type="text"],
.vagtonia-login-wrapper .ui.form input[type="password"] {
    border-radius: 0.75rem !important;
    height: 3.25rem !important;
    padding: 0 1rem !important;
    font-size: 0.95rem !important;
    transition: border-color 0.2s, background-color 0.2s !important;
}

/* Sign In button */
.vagtonia-login-wrapper .ui.primary.button {
    width: 100% !important;
    height: 3.25rem !important;
    border-radius: 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease-out !important;
    margin-top: 0.5rem !important;
    border: none !important;
}

.vagtonia-login-wrapper .ui.primary.button:hover {
    transform: translateY(-1px) !important;
}

/* Footer */
.vagtonia-footer-links {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
    max-width: 24rem;
}

.vagtonia-footer-links p {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    margin-bottom: 1.25rem !important;
}

.vagtonia-footer-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Forgot password area */
.vagtonia-login-wrapper .ui.attached.segment.header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1rem 0 0 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ===== DARK MODE ADJUSTMENTS ===== */
@media (prefers-color-scheme: dark) {
    .page-content.user.signin::before {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 70%);
    }

    .page-content.user.signin::after {
        background: linear-gradient(315deg, rgba(168, 85, 247, 0.06), transparent 70%);
    }

    .vagtonia-login-wrapper .ui.attached.segment {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .vagtonia-login-wrapper .ui.primary.button {
        box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.35) !important;
    }

    .vagtonia-footer-links p {
        color: rgba(255, 255, 255, 0.55) !important;
    }

    .vagtonia-footer-copy {
        color: rgba(255, 255, 255, 0.4);
    }
}

/* ===== LIGHT MODE ADJUSTMENTS ===== */
@media (prefers-color-scheme: light) {
    .page-content.user.signin::before {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 70%);
    }

    .page-content.user.signin::after {
        background: linear-gradient(315deg, rgba(168, 85, 247, 0.04), transparent 70%);
    }

    .vagtonia-login-wrapper .ui.attached.segment {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
    }

    .vagtonia-login-wrapper .ui.primary.button {
        box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.25) !important;
    }

    .vagtonia-footer-links p {
        color: rgba(0, 0, 0, 0.5) !important;
    }

    .vagtonia-footer-copy {
        color: rgba(0, 0, 0, 0.35);
    }
}