/**
 * QuickNews Auth Styles
 */

/* Container */
.qn-auth-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.qn-auth-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

/* Tabs */
.qn-auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e7eb;
}

.qn-auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.qn-auth-tab:hover {
    color: #1f2937;
}

.qn-auth-tab.active {
    color: #2563eb;
}

.qn-auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

/* Form Wraps */
.qn-auth-form-wrap {
    display: none;
}

.qn-auth-form-wrap.active {
    display: block;
}

/* Form */
.qn-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qn-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qn-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.qn-form-group input[type="text"],
.qn-form-group input[type="email"],
.qn-form-group input[type="password"] {
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qn-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qn-field-hint {
    font-size: 12px;
    color: #9ca3af;
}

/* Checkbox Row */
.qn-form-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.qn-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.qn-checkbox-inline input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.qn-forgot-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
}

.qn-forgot-link:hover {
    text-decoration: underline;
}

/* Form Message */
.qn-form-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.qn-form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
}

.qn-form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* Button */
.qn-btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

/* Forgot Password Section */
.qn-forgot-header {
    margin-bottom: 20px;
}

.qn-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.qn-back-btn:hover {
    color: #1f2937;
}

#qn-form-forgot h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #1f2937;
}

.qn-form-description {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Error/Success States */
.qn-auth-error {
    text-align: center;
    padding: 40px 20px;
}

.qn-auth-error svg {
    color: #dc2626;
    margin-bottom: 20px;
}

.qn-auth-error h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1f2937;
}

.qn-auth-error p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
}

/* Logged In State */
.qn-auth-logged-in {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 40px auto;
}

.qn-auth-logged-in p {
    margin: 0 0 20px;
    font-size: 16px;
    color: #4b5563;
}

.qn-auth-logged-in .qn-btn {
    margin: 0 5px;
}

/* Spinner */
.qn-spinner {
    animation: qn-spin 1s linear infinite;
}

@keyframes qn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 500px) {
    .qn-auth-container {
        margin: 20px;
        padding: 25px 20px;
    }
    
    .qn-auth-tabs {
        gap: 0;
    }
    
    .qn-auth-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
}
