/* --- Styles for Authentication Pages (Login, Register, etc.) --- */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 92px);
    padding: 2rem 1rem;
    background-color: var(--card-bg-color); 
}

.auth-card {
    background-color: var(--card-bg-color);
    padding: 2.5rem;
    border-radius: 16px; 
    box-shadow: none; 
    width: 100%;
    max-width: 550px;
}

.auth-card .form-control-lg {
    padding: 0.8rem 1.1rem;
    font-size: 1rem;
}

/* Styles for password validation feedback */
.password-criteria {
    font-size: 0.8rem;
    color: var(--text-color-secondary);
    margin-top: 0.75rem;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    transition: all 0.3s ease-in-out;
}
.password-criteria li {
    list-style: none;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease-in-out, margin 0.3s ease-in-out;
    max-height: 20px;
    overflow: hidden;
    position: relative;
    padding-bottom: 0.25rem;
}
.password-criteria li.valid {
    color: #34c759;
    max-height: 0;
    opacity: 0;
    transform: translateX(-10px);
    margin-bottom: -0.5rem;
    padding-bottom: 0;
}
.password-criteria li.invalid {
    color: #ff3b30;
    max-height: 20px;
    opacity: 1;
    transform: translateX(0);
    margin-bottom: 0;
    padding-bottom: 0.25rem;
}
.password-criteria li .iconify {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.3s ease-in-out; 
}

/* --- Interactive Star Rating Styles --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse; /* This is key to the hover effect */
    justify-content: flex-end;
    font-size: 2rem;
}
.star-rating input[type="radio"] {
    display: none; /* Hide the actual radio buttons */
}
.star-rating label {
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.2s ease;
}
.star-rating input[type="radio"]:checked ~ label,
.star-rating:hover label:hover,
.star-rating:hover label:hover ~ label {
    color: black;
}

/* --- Styles for Simple Success/Info Cards --- */
.simple-success-card .success-icon {
    font-size: 3.5rem;
    color: #34c759; /* Apple green for success */
    margin-bottom: 1.5rem;
}

.simple-success-card h1 {
    font-weight: 600;
}

.simple-success-card .lead {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Base style for the widget */
.cf-turnstile {
    /* Add border-color and box-shadow to the transition */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, height 0.5s ease-in-out, margin 0.5s ease-in-out, border-color 0.3s ease, box-shadow 0.3s ease;
    
    /* Add a transparent border to prevent the page from jumping when the colored border appears */
    border: 2px solid transparent;
    border-radius: 5px; /* Optional: Rounds the corners of the new border */
}

/* NEW: The immediate success state */
.turnstile-success {
    border-color: #28a745; /* A nice success green */
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6); /* Adds the glow effect */
}

/* The delayed hidden state (no changes here) */
.turnstile-hidden {
    opacity: 0;
    transform: scaleY(0);
    height: 0 !important;
    margin: 0 !important;
    border-color: transparent;
}

/* --- Responsive adjustments --- */
@media (max-width: 576px) {
    .auth-container {
        align-items: flex-start; 
        padding: 2rem 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border: none; 
    }

    .password-criteria {
        grid-template-columns: 1fr;
    }
}