/**
 * Auth pages styles — login, register forms
 * Dark theme matching Kildare Comics site
 *
 * @package Kildare_Membership
 */

/* ===== Container ===== */
.kc-auth-container {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 60vh;
}

.kc-auth-card {
    width: 100%;
    max-width: 420px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px 35px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.kc-auth-closed {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
}

/* ===== Header ===== */
.kc-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.kc-auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}

.kc-auth-subtitle {
    color: #999;
    font-size: 0.95rem;
    margin: 0;
}

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

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

.kc-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kc-form-input {
    width: 100%;
    padding: 12px 14px;
    background: #0d0d0d;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.kc-form-input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}

.kc-form-input::placeholder {
    color: #666;
}

/* Chrome autofill — keep dark theme styling and consistent font size */
.kc-form-input:-webkit-autofill,
.kc-form-input:-webkit-autofill:hover,
.kc-form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px #0d0d0d inset;
    font-size: 1rem !important;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}

.kc-form-input.kc-input-error {
    border-color: #e74c3c;
}

.kc-form-input.kc-input-success {
    border-color: #2ecc71;
}

/* Password wrapper */
.kc-password-wrapper {
    position: relative;
}

.kc-password-wrapper .kc-form-input {
    padding-right: 44px;
}

.kc-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.kc-toggle-password .dashicons {
    font-family: dashicons !important;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    font-style: normal;
    font-weight: normal;
    speak: never;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.kc-toggle-password .dashicons-visibility:before {
    content: "\f177";
}

.kc-toggle-password .dashicons-hidden:before {
    content: "\f530";
}

.kc-toggle-password:hover {
    color: #00d9ff;
}

/* Field hints & status */
.kc-field-hint {
    font-size: 0.8rem;
    color: #777;
}

.kc-field-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.kc-field-status.kc-status-error {
    color: #e74c3c;
}

.kc-field-status.kc-status-success {
    color: #2ecc71;
}

.kc-field-status.kc-status-checking {
    color: #f1c40f;
}

/* Password strength meter */
.kc-password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.kc-strength-bar {
    flex: 1;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}

.kc-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
}

.kc-strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* Checkbox */
.kc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ccc;
    cursor: pointer;
}

.kc-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00d9ff;
    cursor: pointer;
}

.kc-checkbox-label a {
    color: #00d9ff;
    text-decoration: none;
}

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

/* Form options row */
.kc-form-options {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* ===== Buttons ===== */
.kc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.kc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kc-btn-primary {
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #0d0d0d;
}

.kc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #33e4ff, #00b3e6);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.kc-btn-secondary {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
}

.kc-btn-secondary:hover:not(:disabled) {
    background: #333;
    border-color: #666;
}

.kc-btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.kc-btn-block {
    width: 100%;
}

/* Loading spinner */
.kc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: kc-spin 0.6s linear infinite;
}

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

/* ===== Messages ===== */
.kc-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.kc-form-message.kc-message-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.kc-form-message.kc-message-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

/* ===== Footer ===== */
.kc-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.kc-auth-footer p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

.kc-auth-footer a {
    color: #00d9ff;
    text-decoration: none;
    font-weight: 600;
}

.kc-auth-footer a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .kc-auth-card {
        padding: 30px 20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

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