/* Elegant Login - Styles */

:root {
    --primary-color: #2271b1;
    --primary-hover: #135e96;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* When used as shortcode on a page */
.elegant-login-container {
    width: 100%;
    max-width: 450px;
    margin: 40px auto;
    padding: 20px;
}

/* Standalone page styles */
body.elegant-login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

body.elegant-login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

body.elegant-login-page .elegant-login-container {
    position: relative;
    z-index: 1;
    margin: 0;
}

.elegant-login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.elegant-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.elegant-login-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.elegant-login-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.elegant-login-tagline {
    font-size: 14px;
    color: #7f8c8d;
}

/* Messages */
.elegant-login-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.elegant-login-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.elegant-login-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.elegant-login-info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

.elegant-login-message svg {
    flex-shrink: 0;
}

/* Tabs */
.elegant-login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.elegant-login-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.elegant-login-tab:hover {
    color: #2c3e50;
}

.elegant-login-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Tab Content */
.elegant-login-tab-content {
    display: none;
}

.elegant-login-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.elegant-login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elegant-login-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.elegant-login-field label svg {
    opacity: 0.6;
}

.elegant-login-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.elegant-login-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Options */
.elegant-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.elegant-login-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.elegant-login-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.elegant-login-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.elegant-login-link:hover {
    text-decoration: underline;
}

/* Button */
.elegant-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color, #2271b1);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.elegant-login-button:hover {
    background: var(--primary-hover, #135e96);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 113, 177, 0.3);
}

.elegant-login-button:active {
    transform: translateY(0);
}

.elegant-login-button svg {
    flex-shrink: 0;
    fill: #fff !important;
}

/* Back Button */
.elegant-login-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.elegant-login-back:hover {
    gap: 12px;
}

.elegant-login-subtitle {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.elegant-login-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.elegant-login-note {
    font-size: 13px;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* Footer */
.elegant-login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.elegant-login-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.elegant-login-home-link:hover {
    color: var(--primary-color);
    gap: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .elegant-login-box {
        padding: 30px 25px;
    }
    
    .elegant-login-title {
        font-size: 26px;
    }
    
    .elegant-login-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .elegant-login-tab {
        border-bottom: 1px solid #e9ecef;
        border-left: 3px solid transparent;
    }
    
    .elegant-login-tab.active {
        border-left-color: var(--primary-color);
        border-bottom-color: #e9ecef;
    }
}

/* Loading State */
.elegant-login-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.elegant-login-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}

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

/* Success/Error Messages in Forms */
#reset-message {
    padding: 12px;
    border-radius: 8px;
    margin: -10px 0 10px 0;
    font-size: 14px;
    display: none;
}

#reset-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

#reset-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

#reset-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}
