/**
 * RT Auth Plugin - Auth Forms Styles
 *
 * Styles for login, registration, and password reset forms.
 */

/* Form Wrapper */
.rt-auth-wrapper {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.rt-auth-form-container {
    background: var(--rt-dark-card);
    border: 1px solid var(--rt-dark-border);
    border-radius: var(--rt-border-radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.rt-auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rt-text-primary);
    text-align: center;
    margin: 0 0 1.5rem 0;
    background: var(--rt-gradient-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Discord Button */
.rt-discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--rt-discord-blurple);
    color: white;
    border: none;
    border-radius: var(--rt-border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--rt-animation-speed) ease;
}

.rt-discord-btn:hover {
    background: var(--rt-discord-blurple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    color: white;
    text-decoration: none;
}

.rt-discord-btn svg {
    flex-shrink: 0;
}

/* Divider */
.rt-auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--rt-text-muted);
    font-size: 0.875rem;
}

.rt-auth-divider::before,
.rt-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rt-dark-border);
}

.rt-auth-divider span {
    padding: 0 1rem;
}

/* Form Styles */
.rt-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rt-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rt-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rt-text-secondary);
}

.rt-form-group label .required {
    color: var(--rt-accent-red);
}

.rt-form-group input[type="text"],
.rt-form-group input[type="email"],
.rt-form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--rt-dark-bg);
    border: 1px solid var(--rt-dark-border);
    border-radius: var(--rt-border-radius);
    color: var(--rt-text-primary);
    font-size: 1rem;
    transition: all var(--rt-animation-speed) ease;
    box-sizing: border-box;
}

.rt-form-group input:focus {
    outline: none;
    border-color: var(--rt-accent-cyan);
    box-shadow: 0 0 0 3px var(--rt-electric-blue-glow);
}

.rt-form-group input::placeholder {
    color: var(--rt-text-muted);
}

.rt-help-text {
    font-size: 0.75rem;
    color: var(--rt-text-muted);
}

.rt-forgot-password {
    font-size: 0.875rem;
    color: var(--rt-accent-cyan);
    text-decoration: none;
    align-self: flex-end;
    margin-top: 0.25rem;
}

.rt-forgot-password:hover {
    color: var(--rt-accent-cyan-light);
    text-decoration: underline;
}

/* Checkbox Group */
.rt-checkbox-group {
    flex-direction: row;
    align-items: flex-start;
}

.rt-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--rt-text-secondary);
}

.rt-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--rt-accent-cyan);
    cursor: pointer;
    flex-shrink: 0;
}

.rt-checkbox-label span {
    line-height: 1.4;
}

.rt-checkbox-label a {
    color: var(--rt-accent-cyan);
    text-decoration: none;
}

.rt-checkbox-label a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.rt-password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.rt-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--rt-dark-border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.rt-strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    transition: all var(--rt-animation-speed) ease;
    border-radius: 2px;
}

.rt-strength-bar[data-score="1"]::after {
    width: 25%;
    background: var(--rt-accent-red);
}

.rt-strength-bar[data-score="2"]::after {
    width: 50%;
    background: var(--rt-accent-yellow);
}

.rt-strength-bar[data-score="3"]::after {
    width: 75%;
    background: var(--rt-accent-green);
}

.rt-strength-bar[data-score="4"]::after {
    width: 100%;
    background: var(--rt-accent-cyan);
}

.rt-strength-label {
    font-size: 0.75rem;
    color: var(--rt-text-muted);
    min-width: 60px;
}

.rt-strength-label[data-score="1"] { color: var(--rt-accent-red); }
.rt-strength-label[data-score="2"] { color: var(--rt-accent-yellow); }
.rt-strength-label[data-score="3"] { color: var(--rt-accent-green); }
.rt-strength-label[data-score="4"] { color: var(--rt-accent-cyan); }

/* Form Messages */
.rt-form-messages {
    min-height: 0;
    transition: all var(--rt-animation-speed) ease;
}

.rt-form-messages:empty {
    display: none;
}

.rt-message {
    padding: 0.75rem 1rem;
    border-radius: var(--rt-border-radius);
    font-size: 0.875rem;
    line-height: 1.4;
}

.rt-message-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.rt-message-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

/* Submit Button */
.rt-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--rt-gradient-primary);
    color: var(--rt-dark-bg);
    border: none;
    border-radius: var(--rt-border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rt-animation-speed) ease;
    position: relative;
}

.rt-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--rt-shadow-button);
}

.rt-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rt-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rt-btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: rt-spin 0.8s linear infinite;
}

@keyframes rt-spin {
    to { transform: rotate(360deg); }
}

.rt-hidden {
    display: none !important;
}

/* Auth Link */
.rt-auth-link {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--rt-text-secondary);
}

.rt-auth-link a {
    color: var(--rt-accent-cyan);
    text-decoration: none;
    font-weight: 500;
}

.rt-auth-link a:hover {
    text-decoration: underline;
}

/* Secondary Button */
.rt-btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--rt-accent-cyan);
    border: 1px solid var(--rt-border-cyan);
    border-radius: var(--rt-border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--rt-animation-speed) ease;
}

.rt-btn-secondary:hover {
    background: var(--rt-border-cyan);
    border-color: var(--rt-border-cyan-hover);
    color: var(--rt-text-primary);
    text-decoration: none;
}

/* Logged In State */
.rt-auth-logged-in {
    text-align: center;
    padding: 2rem;
}

.rt-auth-logged-in p {
    color: var(--rt-text-secondary);
    margin-bottom: 1.5rem;
}

/* Disabled State */
.rt-auth-disabled {
    text-align: center;
    padding: 2rem;
}

.rt-auth-disabled p {
    color: var(--rt-text-muted);
}

/* Password Reset Form */
.rt-password-reset-success {
    text-align: center;
    padding: 2rem 0;
}

.rt-password-reset-success svg {
    color: var(--rt-accent-green);
    margin-bottom: 1rem;
}

.rt-password-reset-success h3 {
    color: var(--rt-text-primary);
    margin-bottom: 0.5rem;
}

.rt-password-reset-success p {
    color: var(--rt-text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 480px) {
    .rt-auth-wrapper {
        padding: 1rem;
    }

    .rt-auth-form-container {
        padding: 1.5rem;
    }

    .rt-auth-title {
        font-size: 1.5rem;
    }
}
