/**
 * Simple Authentication Form Styles
 */

.edestiny-simple-auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.edestiny-simple-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.edestiny-simple-auth-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.edestiny-simple-auth-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Tabs */
.edestiny-simple-auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #e1e5e9;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #0073aa;
}

.tab-button.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* Messages */
.edestiny-simple-auth-messages {
    margin-bottom: 20px;
}

.auth-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Forms */
.edestiny-simple-auth-form {
    display: none;
}

.edestiny-simple-auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.form-group input.error {
    border-color: #dc3545;
}

.submit-button {
    width: 100%;
    padding: 14px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #005a87;
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success state */
.edestiny-simple-auth-success {
    text-align: center;
    padding: 40px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.edestiny-simple-auth-success p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.edestiny-simple-auth-success .button {
    display: inline-block;
    padding: 12px 24px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.edestiny-simple-auth-success .button:hover {
    background: #218838;
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .edestiny-simple-auth-container {
        margin: 20px;
        padding: 20px;
    }
    
    .edestiny-simple-auth-header h2 {
        font-size: 20px;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 10px 12px;
    }
    
    .submit-button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .edestiny-simple-auth-container {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .edestiny-simple-auth-header h2 {
        color: #ecf0f1;
    }
    
    .edestiny-simple-auth-header p {
        color: #bdc3c7;
    }
    
    .tab-button {
        color: #bdc3c7;
    }
    
    .tab-button.active,
    .tab-button:hover {
        color: #3498db;
    }
    
    .tab-button.active {
        border-bottom-color: #3498db;
    }
    
    .form-group label {
        color: #ecf0f1;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .form-group input:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 1px #3498db;
    }
    
    .submit-button {
        background: #3498db;
    }
    
    .submit-button:hover {
        background: #2980b9;
    }
}
