/* Authentication Pages Specific Styles */

/* Remove the body scroll for auth pages to prevent bounce effects */
body.auth-page {
    overflow-y: auto !important;
    min-height: 100% !important;
    height: auto !important;
    background-color: white !important;
}

/* Force proper main content layout for auth pages */
.auth-main-content {
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 60px !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Make container take available width */
.auth-container-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Position the auth card immediately below the navbar with no gap */
.auth-container {
    margin: 0 auto !important;
    padding: 1rem !important;
    max-width: 500px;
}

/* Style the auth card with proper margins */
.auth-card {
    margin-top: 0 !important;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Proper notification styling */
.auth-notification {
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
    position: relative;
}

/* Mobile specific overrides */
@media (max-width: 768px) {

    /* Ensure there's no margin on body */
    body.auth-page {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove all spacing from navbar */
    .auth-page .navbar {
        margin-bottom: 0 !important;
    }

    /* Set explicit sizing on mobile for auth container */
    .auth-container {
        width: 95% !important;
        margin: 0 auto !important;
    }

    /* Hide default notification container */
    .auth-page .container.mt-3 {
        display: none !important;
        height: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        overflow: hidden !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {

    /* Full width container on phones */
    .auth-container {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Full width card with no border-radius on smallest screens */
    .auth-card {
        border-radius: 0 !important;
        margin: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* Auth Pages Stylesheet */

/* Base styling for auth pages */
.auth-page {
    background-color: #f8f9fa;
    overflow-y: auto !important;
    min-height: 100% !important;
    height: auto !important;
}

/* Main auth container */
.auth-main {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 60px !important;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Auth card styling */
.auth-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.auth-card .card-header {
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.auth-card .card-body {
    padding: 1.5rem;
}

/* Button styling */
.auth-page .btn-primary {
    background-color: var(--primary-color, #4a6da7);
    border-color: var(--primary-color, #4a6da7);
}

.auth-page .btn-primary:hover {
    background-color: #3a5d97;
    border-color: #3a5d97;
}

.auth-page .btn-outline-light:hover {
    color: var(--primary-color, #4a6da7);
}

/* Navbar styling specific to auth pages */
.auth-page .navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #2a3b4c, #3a4b5c);
    margin-bottom: 0 !important;
}

.auth-page .navbar-brand {
    display: flex;
    align-items: center;
}

.auth-page .navbar-brand span {
    margin-left: 1rem;
    color: white;
}

/* Alert styling */
.auth-page .alert {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    transition: opacity 0.5s ease-out;
}

.auth-page .alert.fade {
    transition: opacity 0.5s ease-out;
}

.auth-page .alert.fade.show {
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {

    /* Ensure there's no margin on body */
    body.auth-page {
        margin: 0 !important;
        padding: 0 !important;
    }

    .auth-container {
        width: 95%;
        padding: 0 0.5rem;
    }

    .auth-card {
        margin-top: 0.5rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .auth-container {
        width: 100%;
        padding: 0 0.25rem;
    }

    .auth-card {
        border-radius: 0.25rem;
    }

    .auth-page .navbar-brand span {
        font-size: 1rem;
    }
}
