﻿/* /wwwroot/css/login.css
   Fixes:
   - Login panel being cut off (no footer overlap; proper page flex)
   - Background “repeating”/tiling (hard no-repeat + cover)
   - Mobile layout (stack links, better spacing, prevent iOS zoom)
   - Scopes auth layout styles to body.public-auth so it won't affect dashboards
*/

/* Base */
html, body {
    height: 100%;
}

    /* ===============================
   AUTH PAGE LAYOUT (SCOPED)
   =============================== */

    body.public-auth {
        /* Flex column so footer naturally sits at bottom */
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        /* Background */
        background: linear-gradient(0deg, #faf9f7 0%, #953229 100%);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center top;
        font-family: "Inter", sans-serif;
        /* Allow scrolling on short viewports */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        /* Ensure main grows and pushes footer down */
        body.public-auth main {
            flex: 1 0 auto;
        }

        /* Header + footer only styled for auth pages */
        body.public-auth .public-header {
            width: 100%;
            background: #fff;
            padding: 15px 0 10px 0;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            position: sticky;
            top: 0;
            z-index: 50;
            margin-bottom: 16px;
        }

            body.public-auth .public-header img {
                max-height: 75px;
                width: auto;
            }

        body.public-auth .public-footer {
            flex-shrink: 0;
            width: 100%;
            background: #fff;
            text-align: center;
            padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
            font-size: 0.9rem;
            color: #666;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
        }

/* On very short screens, sticky header can eat too much vertical space */
@media (max-height: 700px) {
    body.public-auth .public-header {
        position: relative;
    }
}

/* ===============================
   ANNOUNCEMENTS
   =============================== */

.announcement-wrapper {
    max-width: 1000px;
    margin: 0 auto 12px;
    width: 100%;
    padding: 0 20px;
    font-size: 1.05rem;
}

.announcement-card {
    border-radius: 12px;
    padding: 14px 18px;
    line-height: 1.4;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: inherit;
}

.ann-info {
    /*background: #1e66f5;*/
    background: #00000000;
}

.ann-warn {
    background: #f5a623;
}

/* Quill alignment helpers (login page does not load quill css) */
.announcement-card .ql-align-center {
    text-align: center !important;
}

.announcement-card .ql-align-right {
    text-align: right !important;
}

.announcement-card .ql-align-justify {
    text-align: justify !important;
}

/* Lists + links inside announcements */
.announcement-card ol,
.announcement-card ul {
    padding-left: 1.4rem;
    margin: 0.25rem 0;
}

.announcement-card a {
    color: #fff;
    text-decoration: underline;
}

/* ===============================
   LOGIN CARD
   =============================== */

.login-center-wrapper {
    max-width: 600px;
    margin: 18px auto 0;
    padding: 0 15px;
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    margin-top: 10px;
    text-align: center;
}

    .login-card h2 {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .login-card p {
        color: #666;
        margin-bottom: 14px;
    }

.login-input {
    margin-bottom: 12px;
}

/* Remember me row (works even if you keep your original markup) */
.text-start.mb-2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* Button */
.login-btn {
    width: 100%;
    background: #1e66f5;
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    border: none;
    font-weight: 700;
    margin-top: 6px;
}

    .login-btn:hover {
        background: #1558d1;
    }

/* Links row */
.login-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

/* If you keep bootstrap d-flex row, make it behave similar */
.login-card .d-flex.justify-content-between.mt-2 {
    gap: 10px;
}

/* ===============================
   MOBILE TWEAKS
   =============================== */

@media (max-width: 576px) {
    .announcement-wrapper {
        padding: 0 12px;
    }

    .login-center-wrapper {
        padding: 0 12px;
    }

    .login-card {
        padding: 18px 16px;
    }

        /* Stack your existing bootstrap link row on mobile */
        .login-card .d-flex.justify-content-between.mt-2 {
            flex-direction: column;
            align-items: stretch;
            text-align: center;
        }

            .login-card .d-flex.justify-content-between.mt-2 a {
                display: block;
                padding: 10px 0;
                border-top: 1px solid #eee;
            }

                .login-card .d-flex.justify-content-between.mt-2 a:first-child {
                    border-top: none;
                }

    /* Prevent iOS zoom-on-focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Add breathing room above the footer on auth pages */
body.public-auth main {
    padding-bottom: 24px;
}

