/**
 * IncuCommunity Auth Forms Styles
 *
 * Styles for Login, Registration, and Password Reset forms
 *
 * @package IncuCommunity
 * @since 1.0.0
 */

/* ==========================================================================
   Base Form Styles
   ========================================================================== */

.incuc-login-form,
.incuc-registration-form,
.incuc-password-reset {
    width: 100%;
    box-sizing: border-box;
}

.incuc-login-form *,
.incuc-registration-form *,
.incuc-password-reset * {
    box-sizing: border-box;
}

/* ==========================================================================
   Title & Subtitle
   ========================================================================== */

.incuc-login-form__title,
.incuc-registration-form__title,
.incuc-password-reset__title {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.incuc-login-form__subtitle,
.incuc-registration-form__subtitle,
.incuc-password-reset__subtitle {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.incuc-login-form__field,
.incuc-registration-form__field,
.incuc-password-reset__field {
    margin-bottom: 16px;
}

.incuc-login-form__label,
.incuc-registration-form__label,
.incuc-password-reset__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.incuc-login-form__input,
.incuc-registration-form__input,
.incuc-password-reset__input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.incuc-login-form__input:focus,
.incuc-registration-form__input:focus,
.incuc-password-reset__input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.incuc-login-form__input::placeholder,
.incuc-registration-form__input::placeholder,
.incuc-password-reset__input::placeholder {
    color: #999;
}

/* ==========================================================================
   Password Field with Toggle
   ========================================================================== */

.incuc-login-form__input-wrapper,
.incuc-registration-form__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.incuc-login-form__field--password .incuc-login-form__input,
.incuc-registration-form__field--password .incuc-registration-form__input {
    padding-right: 60px;
}

.incuc-login-form__password-toggle,
.incuc-registration-form__password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.incuc-login-form__password-toggle:hover,
.incuc-registration-form__password-toggle:hover {
    color: #333;
}

/* ==========================================================================
   Password Strength Indicator
   ========================================================================== */

.incuc-registration-form__strength {
    margin-top: 8px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.incuc-registration-form__strength-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.incuc-registration-form__strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.incuc-registration-form__strength--weak .incuc-registration-form__strength-bar::after {
    width: 33%;
    background-color: #dc2626;
}

.incuc-registration-form__strength--medium .incuc-registration-form__strength-bar::after {
    width: 66%;
    background-color: #f59e0b;
}

.incuc-registration-form__strength--strong .incuc-registration-form__strength-bar::after {
    width: 100%;
    background-color: #16a34a;
}

.incuc-registration-form__strength-text {
    font-size: 12px;
    color: #666;
}

.incuc-registration-form__strength--weak .incuc-registration-form__strength-text {
    color: #dc2626;
}

.incuc-registration-form__strength--medium .incuc-registration-form__strength-text {
    color: #f59e0b;
}

.incuc-registration-form__strength--strong .incuc-registration-form__strength-text {
    color: #16a34a;
}

/* ==========================================================================
   Options Row (Remember Me + Forgot Password)
   ========================================================================== */

.incuc-login-form__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.incuc-login-form__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.incuc-login-form__remember input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ==========================================================================
   Terms & Conditions
   ========================================================================== */

.incuc-registration-form__terms {
    margin-bottom: 20px;
}

.incuc-registration-form__terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.incuc-registration-form__terms-label input[type="checkbox"] {
    margin: 3px 0 0 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.incuc-login-form__submit-wrapper,
.incuc-registration-form__submit-wrapper,
.incuc-password-reset__submit-wrapper {
    margin-bottom: 16px;
}

.incuc-login-form__submit,
.incuc-registration-form__submit,
.incuc-password-reset__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.incuc-login-form__submit:hover,
.incuc-registration-form__submit:hover,
.incuc-password-reset__submit:hover {
    background-color: #2563eb;
}

.incuc-login-form__submit:active,
.incuc-registration-form__submit:active,
.incuc-password-reset__submit:active {
    transform: scale(0.98);
}

.incuc-login-form__submit:disabled,
.incuc-registration-form__submit:disabled,
.incuc-password-reset__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.incuc-login-form__submit-loading,
.incuc-registration-form__submit-loading,
.incuc-password-reset__submit-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.incuc-login-form__submit-loading::before,
.incuc-registration-form__submit-loading::before,
.incuc-password-reset__submit-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: incuc-spinner 0.8s linear infinite;
}

@keyframes incuc-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Links
   ========================================================================== */

.incuc-login-form__link,
.incuc-registration-form__link,
.incuc-password-reset__link {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.incuc-login-form__link:hover,
.incuc-registration-form__link:hover,
.incuc-password-reset__link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.incuc-login-form__register,
.incuc-registration-form__login,
.incuc-password-reset__links {
    text-align: center;
    margin-top: 16px;
}

.incuc-password-reset__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.incuc-login-form__message,
.incuc-registration-form__message,
.incuc-password-reset__message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.incuc-login-form__message--error,
.incuc-registration-form__message--error,
.incuc-password-reset__message--error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.incuc-login-form__message--success,
.incuc-registration-form__message--success,
.incuc-password-reset__message--success {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.incuc-login-form__logged-in-message,
.incuc-registration-form__logged-in-message,
.incuc-password-reset__logged-in-message {
    padding: 20px;
    text-align: center;
    font-size: 15px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 6px;
}

/* ==========================================================================
   Field Validation States
   ========================================================================== */

.incuc-login-form__input--error,
.incuc-registration-form__input--error,
.incuc-password-reset__input--error {
    border-color: #dc2626;
}

.incuc-login-form__input--error:focus,
.incuc-registration-form__input--error:focus,
.incuc-password-reset__input--error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.incuc-login-form__field-error,
.incuc-registration-form__field-error,
.incuc-password-reset__field-error {
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .incuc-login-form__options {
        flex-direction: column;
        align-items: flex-start;
    }

    .incuc-login-form__title,
    .incuc-registration-form__title,
    .incuc-password-reset__title {
        font-size: 20px;
    }

    .incuc-login-form__input,
    .incuc-registration-form__input,
    .incuc-password-reset__input {
        padding: 10px 12px;
    }

    .incuc-login-form__submit,
    .incuc-registration-form__submit,
    .incuc-password-reset__submit {
        padding: 12px 20px;
    }
}
