


/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1em;
    color: white; /* Ensure text is white */
    z-index: 1000; /* Above all other elements */
    width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.8); /* Solid background with slight transparency */
    display: none; /* Hidden by default, shown via JS */
}

.notification-success {
    background-color: #28a745; /* Override with solid color */
    border: 1px solid #1e7e34;
}

.notification-error {
    background-color: #dc3545; /* Override with solid color */
    border: 1px solid #b02a37;
}

.notification.slide-in {
    display: block; /* Ensure display is set when animation starts */
    animation: slideIn 0.5s ease-in forwards;
}

.notification.slide-out {
    animation: slideOut 0.5s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .notification {
        width: 80%;
        right: 10px;
        font-size: 0.9em;
    }
}

/* Full background container */
.full-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../img/Campus.jpg') no-repeat center center;
    background-size: cover;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0; /* Fallback color if image fails to load */
}

/* Form overlay container */
.form-overlay {
    position: relative;
    width: 400px;
    height: 450px;
    padding: 25px;
    border-radius: 15px;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: width 0.4s ease, height 0.4s ease;
}

    .form-overlay.signup-active {
        width: 650px;
        height: 700px;
    }

/* Blue container with background */
.blue-container {
    position: relative;
    border-radius: 15px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

/* Background layer with opacity */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 66, 101, 0.44);
    border-radius: 15px;
    z-index: 1;
}

/* Form content */
.form-content {
    position: relative;
    text-align: center;
    z-index: 2;
    width: 100%;
    padding: 20px;
    color: white;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Form section transition */
.form-section {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .form-section[style*="display: none"] {
        opacity: 0;
        transform: scale(0.95);
    }

/* Logo styling */
.logo {
    width: 250px; /* Bigger than before */
    height: 120px; /* Taller area */
    margin: auto; /* Center + spacing below */
    display: flex;
    justify-content: center;
    align-items: center;
}

    .logo img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* avoids stretching */
    }


/* Heading styles */
h1 {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Form group styling */
.form-group {
    margin-bottom: 15px;
    text-align: left;
    flex: 1;
}

/* Form sections - Login and Signup forms */
.form-section {
    width: 100%;
}

/* Flex layout for signup form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-height: 75vh;
    padding: 0 10px;
}

/* Field pair for two fields per row */
.field-pair {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

/* Full-width elements in signup form */
.signup-form .form-group.full-width {
    width: 100%;
}

/* Input styling */
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 45px;
}

/* Intl-tel-input specific styling */
.iti {
    width: 100%;
    position: relative;
}

.iti__flag-container {
    padding-left: 12px;
}

.iti__country-list {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.iti__country {
    padding: 8px 12px;
    color: #333;
}

    .iti__country:hover {
        background: rgba(79, 195, 247, 0.2);
    }

.form-group .iti input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 25px;
    padding-left: 50px;
}

    /* Input focus states */
    .form-group input:focus,
    .form-group select:focus,
    .form-group .iti input:focus {
        outline: none;
        border-color: #4fc3f7;
        box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.3);
    }

.form-group input::placeholder {
    color: #666;
}

/* Signup link and login link */
.signup-link,
.login-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
    transition: color 0.3s ease;
    font-weight: 500;
    text-align: center;
}

    .signup-link:hover,
    .login-link:hover {
        color: #ff5252;
        text-decoration: underline;
    }

/* Button styles */
.btn {
    width: 50%;
    margin: auto;
    height: fit-content;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn:hover {
        background: #1976d2;
        transform: translateY(-1px);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

    /* Button text and loader */
    .btn .btn-text {
        display: inline-block;
    }

    .btn .loader {
        width: 24px;
        height: 24px;
        border: 3px solid transparent;
        border-top: 3px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        display: none;
    }

    /* Loading state for button */
    .btn.loading .btn-text {
        display: none;
    }

    .btn.loading .loader {
        display: inline-block;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .full-background {
        padding: 10px;
    }

    .form-overlay {
        width: calc(100vw - 20px);
        height: auto;
        min-height: 450px;
        max-height: calc(100vh - 20px);
        padding: 15px;
        transition: width 0.4s ease, height 0.4s ease;
    }

        .form-overlay.signup-active {
            width: calc(100vw - 20px);
            height: auto;
            min-height: 650px;
            max-height: calc(100vh - 20px);
        }

    .form-content {
        padding: 10px;
    }

    .signup-form {
        gap: 10px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .field-pair {
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        width: 200px;
        height: 200px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 12px;
    }

        .form-group input,
        .form-group select,
        .form-group .iti input {
            padding: 10px;
            font-size: 14px;
            min-height: 40px;
            padding-left: 45px;
        }

    .signup-link,
    .login-link {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .btn {
        padding: 12px;
        font-size: 16px;
    }

        .btn .loader {
            width: 20px;
            height: 20px;
            border-width: 2px;
        }

    .iti__country-list {
        width: 100%;
        max-width: calc(100vw - 40px);
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-overlay {
        width: 450px;
        height: 480px;
        transition: width 0.4s ease, height 0.4s ease;
    }

        .form-overlay.signup-active {
            width: 600px;
            height: 650px;
        }

    .signup-form {
        gap: 15px;
    }

    .field-pair {
        flex-direction: row;
        gap: 18px;
    }

    .iti__country-list {
        width: auto;
    }
}
/* ============================================
   MOBILE — ALL FIXES COMBINED (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {

    /* Full background fix */
    .full-background {
        background-size: cover !important;
        background-position: center center !important;
        height: 100vh !important;
        padding: 0;
    }

    /* Form overlay adjustments */
    .form-overlay {
        width: calc(100vw - 20px);
        max-width: 420px;
        height: auto;
        min-height: 450px;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 15px;
        border-radius: 12px;
        transition: width 0.4s ease, height 0.4s ease;
    }

        .form-overlay.signup-active {
            width: calc(100vw - 20px);
            max-width: 420px;
            height: auto;
            min-height: 650px;
            padding-bottom: 20px;
        }

    /* Content spacing */
    .form-content {
        padding: 10px !important;
    }

    /* Logo scaling */
    .logo {
        width: 160px;
        height: 80px;
        margin-bottom: 10px;
    }

    /* Headings */
    h1,
    h6 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    /* Signup form */
    .signup-form {
        gap: 10px;
        max-height: none;
        overflow-y: visible;
        padding: 0 5px;
    }

    /* Two-field rows become stacked */
    .field-pair {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Inputs and selects */
    .form-group input,
    .form-group select,
    .form-group .iti input {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 40px;
        border-radius: 18px !important;
        padding-left: 45px;
    }

    .form-group {
        margin-bottom: 12px !important;
    }

    /* Signup / login links */
    .signup-link,
    .login-link {
        font-size: 13px;
        margin-bottom: 12px;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        border-radius: 25px;
    }

        .btn .loader {
            width: 20px;
            height: 20px;
            border-width: 2px;
        }

    /* Phone input dropdown */
    .iti__flag-container {
        padding-left: 8px;
    }

    .iti__country-list {
        max-width: calc(100vw - 30px);
        width: 100%;
    }

    /* Notification message */
    .notification {
        width: 80%;
        right: 10px;
        font-size: 0.9em;
    }
}

/* ============================================
   MOBILE FIX — KEEP LOGO VISIBLE + SCROLL FORM FIELDS
   ============================================ */
@media (max-width: 768px) {

    /* Form overlay fits screen */
    .form-overlay.signup-active {
        height: auto;
        max-height: 90vh;
        overflow: hidden; /* prevent unwanted page scroll */
        padding-bottom: 10px;
    }

    /* Blue container stays fixed height */
    .blue-container {
        height: auto;
        max-height: 90vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* Form content scrolls WITHOUT affecting logo */
    .form-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }

    /* ONLY the signup form scrolls — logo always visible */
    #signupForm {
        flex: 1;
        overflow-y: auto !important;
        padding-bottom: 25px;
        margin-top: 10px;
    }

    /* Keep logo visible and untouchable */
    .logo {
        flex-shrink: 0 !important;
        margin-bottom: 10px;
    }

    /* Improve spacing on mobile */
    .signup-form {
        gap: 12px;
        padding: 0 5px;
    }

    /* Avoid full-page scrolling */
    body {
        overflow-y: hidden !important;
    }
}

/* Large screen adjustments */
@media (min-width: 1025px) {
    .form-overlay {
        width: 450px;
        height: 500px;
        padding: 30px;
        transition: width 0.4s ease, height 0.4s ease;
    }

        .form-overlay.signup-active {
            width: 700px;
            height: 750px;
        }

    .signup-form {
        gap: 15px;
    }

    .field-pair {
        gap: 20px;
    }

    h1 {
        font-size: 32px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .form-group input,
    .form-group select,
    .form-group .iti input {
        padding: 15px;
        font-size: px;
        min-height: 50px;
        padding-left: 50px;
    }

    .btn {
        padding: 14px;
        font-size: 18px;
    }

    .iti__country-list {
        width: auto;
    }
}
