/* === Base Reset === */
html, body {
    margin: 0;
    padding: 0;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    
    background-size: cover;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

body.login-signup-bg {
   /* background: url('../assets/header_image9.png') no-repeat center center fixed; 
    background-size: cover;*/
}

/* === Wrapper to center auth container === */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px 16px;
    box-sizing: border-box;
}

/* === Auth Container === */
.mindfulness-auth-container {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 32px 24px;
    animation: fadeSlideUp 0.3s ease-in-out;
    box-sizing: border-box;
}

/* === Animations === */
@keyframes fadeSlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Logo === */
.auth-logo {
    display: block;
    margin: 0 auto 16px;
    max-width: 120px !important;
}

/* === Headings === */
.mindfulness-auth-container h2 {
    text-align: center;
    color: #222;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.5rem;
}

/* === Form === */
.mindfulness-auth-container form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* === Input Fields === */
.mindfulness-auth-container input[type="text"],
.mindfulness-auth-container input[type="email"],
.mindfulness-auth-container input[type="password"] {
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: #fdfdfd;
    transition: border-color 0.3s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.mindfulness-auth-container input:focus {
    border-color: #4682B4;
    box-shadow: 0 0 0 2px rgba(70, 130, 180, 0.2);
    outline: none;
}

/* === Submit Button === */
.mindfulness-auth-container input[type="submit"] {
    background: #4682B4;
    color: #fff;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mindfulness-auth-container input[type="submit"]:hover {
    background: #3CB371;
}

/* === Links === */
.mindfulness-auth-container p {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 10px;
}

.mindfulness-auth-container p a {
    color: #4682B4;
    font-weight: 600;
    text-decoration: none;
}

.mindfulness-auth-container p a:hover {
    color: #3CB371;
}

/* === Error & Success Messages (used in older inline method) === */
.mindfulness-auth-container .error,
.mindfulness-auth-container .success {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.mindfulness-auth-container .error {
    background: #fff3f3;
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

.mindfulness-auth-container .success {
    background: #e6ffed;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* === Checkbox Inline === */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-top: 6px;
}

.checkbox-inline a {
    text-decoration: underline;
    color: #333;
}

/* === Responsive === */
@media (max-width: 480px) {
    .mindfulness-auth-container {
        padding: 24px 16px;
        border-radius: 10px;
    }

    .mindfulness-auth-container h2 {
        font-size: 1.3rem;
    }
}

/* === Toast System === */
#toast-container {
    font-family: 'Segoe UI', sans-serif;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 320px;
}

.toast-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.toast-message.success {
    background-color: #e6ffed;
    color: #155724;
    border-left: 5px solid #28a745;
}

.toast-message.error {
    background-color: #ffeaea;
    color: #b22222;
    border-left: 5px solid #b22222;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Redirecting Overlay After Signup === */

.redirecting-message {
    font-size: 1.2rem;
    color: #333;
}


.redirecting-message p {
    margin: 8px 0;
}

.redirecting-message .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 5px solid #eee;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}


#redirecting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    text-align: center;
}



.spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border: 5px solid #eee;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

#password-strength {
    margin-top: 6px;
    font-weight: 600;
    font-size: 14px;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

#password-strength-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}

#password-strength-fill {
    height: 100%;
    width: 0%;
    background: #ccc;
    transition: width 0.3s ease;
}

.password-rules {
    list-style: none;
    padding: 0;
    margin: 8px 0 16px;
    font-size: 14px;
}

.password-rules li {
    margin-bottom: 4px;
    color: #999;
}

.password-rules li.passed {
    color: #4CAF50;
    font-weight: bold;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 40px; /* space for icon */
}

.password-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    color: #555;
}

.input-error {
    color: #d9534f;
    font-size: 0.9em;
    margin-top: 4px;
}

.password-wrapper {
    position: relative;
}
.password-wrapper .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
}

.password-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-wrapper input[type="password"],
.password-toggle-wrapper input[type="text"] {
    width: 100%;
    padding-right: 40px; /* space for the icon */
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    color: #555;
    font-size: 18px;
}



