/**
 * SENNA Premium Login - Luxury Magazine Aesthetic
 * Inspired by Vogue, Harper's Bazaar, and sophisticated editorial design
 * Subtle elegance over flashy effects
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@200;300;400;500;600&display=swap');

:root {
    --senna-charcoal: #2c2c2c;
    --senna-soft-black: #1a1a1a;
    --senna-warm-white: #fefefe;
    --senna-cream: #faf9f7;
    --senna-sage: #8b9a8b;
    --senna-warm-grey: #e8e6e3;
    --senna-deep-grey: #4a4a4a;
    --senna-accent-gold: #c9a876;
    --senna-subtle-border: rgba(44, 44, 44, 0.08);
    --senna-shadow-light: rgba(0, 0, 0, 0.02);
    --senna-shadow-medium: rgba(0, 0, 0, 0.06);
}

.senna-smart-login-widget {
    max-width: 420px;
    margin: 60px auto;
    background: var(--senna-warm-white);
    border: 1px solid var(--senna-warm-grey);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 8px 40px var(--senna-shadow-light);
    transition: box-shadow 0.3s ease;
    position: relative;
}

.senna-smart-login-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--senna-charcoal) 50%, transparent 100%);
    opacity: 0.6;
}

.senna-smart-login-widget:hover {
    box-shadow: 0 12px 60px var(--senna-shadow-medium);
}

/* Elegant Loading State */
.senna-widget-loading {
    padding: 80px 40px;
    text-align: center;
    background: var(--senna-cream);
}

.senna-elegant-spinner {
    width: 24px;
    height: 24px;
    border: 1px solid var(--senna-warm-grey);
    border-top: 1px solid var(--senna-charcoal);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: senna-refined-spin 1.8s linear infinite;
}

@keyframes senna-refined-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.senna-widget-loading p {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: var(--senna-deep-grey);
    font-style: italic;
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Logged Out - Editorial Style */
.senna-logged-out-widget {
    padding: 60px 50px;
}

.senna-login-header {
    text-align: center;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--senna-subtle-border);
    padding-bottom: 36px;
}

.senna-login-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 400;
    color: var(--senna-charcoal);
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.senna-login-header p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--senna-sage);
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Refined Form Styling */
.senna-login-form {
    margin-bottom: 40px;
}

.senna-form-group {
    margin-bottom: 32px;
    position: relative;
}

.senna-form-group label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--senna-deep-grey);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.senna-form-control {
    width: 100%;
    padding: 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--senna-warm-grey);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: var(--senna-charcoal);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.senna-form-control::placeholder {
    color: var(--senna-sage);
    font-weight: 300;
    opacity: 0.7;
}

.senna-form-control:focus {
    outline: none;
    border-bottom-color: var(--senna-charcoal);
    background: transparent;
}

.senna-form-control:focus::placeholder {
    opacity: 0.4;
}

/* Minimal Checkbox */
.senna-form-options {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.senna-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--senna-deep-grey);
    font-weight: 300;
}

.senna-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    accent-color: var(--senna-charcoal);
    opacity: 0.8;
}

.senna-checkbox-label:hover {
    color: var(--senna-charcoal);
}

/* Understated Submit Button */
.senna-login-submit {
    width: 100%;
    padding: 18px 0;
    background: var(--senna-charcoal);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--senna-warm-white);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    position: relative;
}

.senna-login-submit:hover:not(:disabled) {
    background: var(--senna-soft-black);
    transform: translateY(-1px);
}

.senna-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--senna-sage);
}

/* Refined Links */
.senna-login-links {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--senna-subtle-border);
}

.senna-forgot-link,
.senna-register-link {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--senna-sage);
    text-decoration: none;
    margin: 0 16px;
    font-weight: 300;
    letter-spacing: 0.02em;
    position: relative;
    transition: color 0.3s ease;
}

.senna-forgot-link::after,
.senna-register-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--senna-charcoal);
    transition: width 0.3s ease;
}

.senna-forgot-link:hover,
.senna-register-link:hover {
    color: var(--senna-charcoal);
}

.senna-forgot-link:hover::after,
.senna-register-link:hover::after {
    width: 100%;
}

/* Logged In - Sophisticated Member Area */
.senna-logged-in-widget {
    padding: 50px;
    background: var(--senna-cream);
}

.senna-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--senna-subtle-border);
}

.senna-user-avatar {
    margin-right: 20px;
}

.senna-user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--senna-warm-white);
    box-shadow: 0 4px 20px var(--senna-shadow-light);
    filter: grayscale(10%);
}

.senna-user-details {
    flex: 1;
}

.senna-welcome-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--senna-charcoal);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.senna-user-role {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--senna-sage);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
    margin: 0;
}

/* Elegant Menu */
.senna-user-menu {
    margin-top: 0;
}

.senna-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.senna-menu-list li {
    margin-bottom: 0;
    border-bottom: 1px solid var(--senna-subtle-border);
}

.senna-menu-list li:last-child {
    border-bottom: none;
}

.senna-menu-link {
    display: flex;
    align-items: center;
    padding: 20px 0;
    text-decoration: none;
    color: var(--senna-charcoal);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.senna-menu-link::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: var(--senna-charcoal);
    transition: width 0.3s ease;
}

.senna-menu-link:hover::before {
    width: 40px;
}

.senna-menu-link:hover {
    color: var(--senna-soft-black);
    padding-left: 16px;
}

.senna-menu-link i,
.senna-menu-link .dashicons {
    margin-right: 16px;
    font-size: 16px;
    color: var(--senna-sage);
    transition: color 0.3s ease;
}

.senna-menu-link:hover i,
.senna-menu-link:hover .dashicons {
    color: var(--senna-charcoal);
}

.senna-logout-link:hover {
    color: #8b5a5a !important;
}

.senna-logout-link:hover i,
.senna-logout-link:hover .dashicons {
    color: #8b5a5a !important;
}

/* Refined Messages */
.senna-login-messages {
    margin-top: 24px;
}

.senna-error-message,
.senna-success-message {
    padding: 16px 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    text-align: center;
    border-top: 1px solid;
    border-bottom: 1px solid;
    margin-bottom: 16px;
}

.senna-error-message {
    color: #8b5a5a;
    border-color: rgba(139, 90, 90, 0.2);
    background: rgba(139, 90, 90, 0.02);
}

.senna-success-message {
    color: var(--senna-sage);
    border-color: rgba(139, 154, 139, 0.2);
    background: rgba(139, 154, 139, 0.02);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
    .senna-smart-login-widget {
        margin: 20px;
        max-width: none;
    }
    
    .senna-logged-out-widget,
    .senna-logged-in-widget {
        padding: 40px 30px;
    }
    
    .senna-login-header h3 {
        font-size: 28px;
    }
    
    .senna-user-info {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .senna-user-avatar {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .senna-welcome-text {
        font-size: 22px;
    }
    
    .senna-form-control {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

@media (max-width: 360px) {
    .senna-logged-out-widget,
    .senna-logged-in-widget {
        padding: 30px 25px;
    }
    
    .senna-login-header {
        margin-bottom: 36px;
        padding-bottom: 28px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .senna-user-avatar img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .senna-smart-login-widget {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        font-size: 12pt;
    }
    
    .senna-login-header h3,
    .senna-welcome-text {
        color: black !important;
    }
    
    .senna-form-control {
        border-bottom: 1px solid #333 !important;
    }
    
    .senna-login-submit {
        background: #333 !important;
        color: white !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --senna-charcoal: #000000;
        --senna-sage: #666666;
        --senna-subtle-border: rgba(0, 0, 0, 0.2);
    }
}

/* Focus Styles for Accessibility */
.senna-form-control:focus,
.senna-login-submit:focus,
.senna-menu-link:focus,
.senna-forgot-link:focus,
.senna-register-link:focus {
    outline: 2px solid var(--senna-charcoal);
    outline-offset: 2px;
}

/* Animation Classes */
.senna-fade-in {
    animation: senna-subtle-fade-in 0.6s ease-out;
}

@keyframes senna-subtle-fade-in {
    from { 
        opacity: 0; 
        transform: translateY(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}