/**
 * Lynktopus Auth Styles
 * 
 * Styles for authentication pages (login, etc.)
 * WordPress-aligned design system
 * 
 * @version 2.0.0
 * @package Lynktopus
 */

/* ==========================================================================
   CSS Variables & Root Styles
   ========================================================================== */

:root {
    /* Brand / semantic colors */
    --primary: #2271b1;
    --primary-hover: #135e96;
    --success: #00a32a;
    --warning: #dba617;
    --danger: #d63638;
    --info: #17a2b8;
    --secondary: #6c757d;

    /* Pale tonal backgrounds */
    --primary-pale: #e8f1fb;
    --success-pale: #e6f6eb;
    --warning-pale: #fef9e7;
    --danger-pale:  #fdeaea;
    --info-pale:    #e8f7fb;

    /* Semantic text colors — WCAG AA on matching pale background */
    --success-text: #155724;
    --danger-text:  #721c24;
    --warning-text: #856404;
    --info-text:    #0c5460;

    /* Border radius */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Typography */
    --text-dark: #1d2327;

    /* Transitions */
    --transition-fast: 0.2s ease;
}

/* ==========================================================================
   Base Layout
   ========================================================================== */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ==========================================================================
   Auth Container & Card
   ========================================================================== */

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Auth Header
   ========================================================================== */

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: block;
    margin: 0 auto 1rem;
    height: 80px;
    width: auto;
}

.auth-header h1 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 600;
}

.auth-header p {
    margin: 0;
    color: var(--secondary);
    font-size: 0.95rem;
}

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

.flash-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.flash-message.success {
    background: var(--success-pale);
    color: var(--success-text);
    border: 1px solid #a3d9b1;
    border-left: 4px solid var(--success);
}

.flash-message.error {
    background: var(--danger-pale);
    color: var(--danger-text);
    border: 1px solid #f0b8ba;
    border-left: 4px solid var(--danger);
}

.flash-message.info {
    background: var(--info-pale);
    color: var(--info-text);
    border: 1px solid #a8dde8;
    border-left: 4px solid var(--info);
}

.flash-message.warning {
    background: var(--warning-pale);
    color: var(--warning-text);
    border: 1px solid #f0d080;
    border-left: 4px solid var(--warning);
}

/* ==========================================================================
   Welcome Page
   ========================================================================== */

.welcome-message {
    text-align: center;
    padding: 1rem 0 1.5rem;
    color: var(--secondary);
    font-size: 0.95rem;
}

.welcome-message p {
    margin: 0;
}

/* ==========================================================================
   Auth Footer
   ========================================================================== */

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: var(--secondary);
}

.auth-footer p {
    margin: 0;
}

/* ==========================================================================
   Login Form Layout
   ========================================================================== */

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    margin: 0 auto;
}

/* Form field groups - two-column layout */
.form-field {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Labels - right-aligned */
label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1.125rem;   /* 18px */
    text-align: right;
    white-space: nowrap;
    margin-bottom: 0;
}

/* Inputs - left-aligned */
input[type="email"],
input[type="password"] {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.125rem;   /* 18px */
    width: 100%;
    margin-bottom: 0;
}

/* ==========================================================================
   Form Buttons
   ========================================================================== */

/* Base button — mirrors admin.css .btn */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;   /* 15px */
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    min-width: 160px;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}
