/**
 * Advanced User Access Control - Frontend Styles
 * Plasma Design Theme Integration
 */

/* General Form Styles - Plasma Design Compatible */
.auc-form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: white;
}

.auc-form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 300;
    letter-spacing: 1px;
}

.auc-form-field {
    margin-bottom: 1rem;
}

.auc-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.auc-form-field input[type="text"],
.auc-form-field input[type="email"],
.auc-form-field input[type="password"],
.auc-form-field input[type="url"],
.auc-form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.auc-form-field input:focus,
.auc-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.auc-form-field.error input,
.auc-form-field.error textarea {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
}

.auc-form-field .field-description {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Checkbox and Radio Styles */
.auc-checkbox-field,
.auc-radio-field {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.auc-checkbox-field input[type="checkbox"],
.auc-radio-field input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.auc-checkbox-field label,
.auc-radio-field label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Button Styles - Plasma Design Green Glow */
.auc-submit-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00ff00, #00cc00, #009900);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.auc-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auc-submit-button:hover {
    background: linear-gradient(135deg, #00ff33, #00dd00, #00aa00);
    box-shadow: 0 6px 25px rgba(0, 255, 0, 0.5), 0 0 30px rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
}

.auc-submit-button:hover::before {
    left: 100%;
}

.auc-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 0, 0.4);
}

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

.auc-secondary-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #0073aa;
    border: 1px solid #0073aa;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.auc-secondary-button:hover {
    background: #0073aa;
    color: white;
    text-decoration: none;
}

/* Message Styles */
.auc-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.875rem;
}

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

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

.auc-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.auc-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Error List */
.auc-error-list {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.auc-error-list ul {
    margin: 0;
    padding-left: 1.5rem;
}

.auc-error-list li {
    margin-bottom: 0.5rem;
}

.auc-error-list li:last-child {
    margin-bottom: 0;
}

/* Loading Spinner */
.auc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: auc-spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

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

/* Form Links */
.auc-form-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e1e1;
}

.auc-form-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 0.875rem;
    margin: 0 0.5rem;
}

.auc-form-links a:hover {
    text-decoration: underline;
}

/* Login Status Widget */
.auc-login-status {
    margin: 1rem 0;
}

.auc-login-status.logged-in {
    padding: 1rem;
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
}

.auc-login-status.logged-out {
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.auc-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auc-user-avatar img {
    border-radius: 50%;
}

.auc-welcome-text {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.auc-user-actions {
    font-size: 0.9rem;
}

.auc-dashboard-link, .auc-logout-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.auc-dashboard-link:hover, .auc-logout-link:hover {
    text-decoration: underline;
}

.auc-separator {
    margin: 0 0.5rem;
    color: #666;
}

.auc-login-message {
    display: block;
    margin-bottom: 1rem;
    color: #666;
}

.auc-login-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* User Dashboard */
.auc-user-dashboard {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.auc-dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e1e1;
}

.auc-dashboard-header h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.auc-dashboard-header .user-avatar {
    margin-bottom: 1rem;
}

.auc-dashboard-section {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.auc-dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 0.5rem;
}

.auc-profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.auc-profile-item {
    display: flex;
    flex-direction: column;
}

.auc-profile-item label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.auc-profile-item span {
    color: #666;
}

/* Restricted Content */
.auc-restricted-content {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.auc-restricted-content a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.auc-restricted-content a:hover {
    text-decoration: underline;
}

/* Password Strength Meter */
.auc-password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    overflow: hidden;
}

.auc-password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.auc-password-strength.weak .auc-password-strength-bar {
    width: 25%;
    background: #dc3232;
}

.auc-password-strength.fair .auc-password-strength-bar {
    width: 50%;
    background: #ffb900;
}

.auc-password-strength.good .auc-password-strength-bar {
    width: 75%;
    background: #00a32a;
}

.auc-password-strength.strong .auc-password-strength-bar {
    width: 100%;
    background: #00a32a;
}

.auc-password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auc-form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .auc-user-dashboard {
        margin: 1rem;
        padding: 1rem;
    }
    
    .auc-dashboard-section {
        padding: 1rem;
    }
    
    .auc-profile-info {
        grid-template-columns: 1fr;
    }
    
    .auc-form-links a {
        display: block;
        margin: 0.25rem 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auc-form-container,
    .auc-dashboard-section {
        background: #2c2c2c;
        border-color: #444;
        color: #e1e1e1;
    }
    
    .auc-form-container h2,
    .auc-dashboard-section h3,
    .auc-form-field label,
    .auc-profile-item label {
        color: #e1e1e1;
    }
    
    .auc-form-field input,
    .auc-form-field textarea {
        background: #3c3c3c;
        border-color: #555;
        color: #e1e1e1;
    }
    
    .auc-form-field input:focus,
    .auc-form-field textarea:focus {
        border-color: #4a9eff;
        box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
    }
    
    .auc-profile-item span {
        color: #ccc;
    }
}

/* Print Styles */
@media print {
    .auc-form-container,
    .auc-user-dashboard {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .auc-submit-button,
    .auc-secondary-button,
    .auc-form-links {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .auc-form-container,
    .auc-dashboard-section {
        border-width: 2px;
    }
    
    .auc-submit-button {
        border: 2px solid #000;
    }
    
    .auc-form-field input:focus,
    .auc-form-field textarea:focus {
        border-width: 3px;
    }
}

/* Plasma Design Theme Overrides */
body.plasma-design .auc-login-button,
body.plasma-design .auc-register-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #00ff00, #00cc00, #009900);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 3px 12px rgba(0, 255, 0, 0.3);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

body.plasma-design .auc-register-button {
    background: linear-gradient(135deg, #ff4444, #dd3333, #bb2222);
    box-shadow: 0 3px 12px rgba(255, 68, 68, 0.3);
}

body.plasma-design .auc-login-button:hover,
body.plasma-design .auc-register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 0, 0.5), 0 0 25px rgba(0, 255, 0, 0.3);
}

body.plasma-design .auc-register-button:hover {
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.5), 0 0 25px rgba(255, 68, 68, 0.3);
}

body.plasma-design .auc-logout-link,
body.plasma-design .auc-dashboard-link {
    color: #00ff88;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

body.plasma-design .auc-logout-link:hover,
body.plasma-design .auc-dashboard-link:hover {
    color: #00ffaa;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    text-decoration: none;
}

body.plasma-design .auc-login-status.logged-in {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.plasma-design .auc-login-status.logged-out {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.plasma-design .auc-welcome-text {
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

body.plasma-design .auc-login-message {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

body.plasma-design .auc-restricted-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.plasma-design .auc-restricted-content h3 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
}

/* Form field adjustments for Plasma theme */
body.plasma-design .auc-form-field label {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

body.plasma-design .auc-form-field input[type="text"],
body.plasma-design .auc-form-field input[type="email"],
body.plasma-design .auc-form-field input[type="password"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

body.plasma-design .auc-form-field input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

body.plasma-design .auc-form-field input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Already logged in section */
.auc-already-logged-in {
    text-align: center;
    padding: 2rem;
    background: rgba(128, 128, 128, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.auc-logged-in-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.auc-dashboard-btn {
    background: linear-gradient(135deg, #00ff00, #00cc00, #009900) !important;
    color: white !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

.auc-dashboard-btn:hover {
    background: linear-gradient(135deg, #00cc00, #009900, #006600) !important;
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4) !important;
    transform: translateY(-2px) !important;
}

.auc-logout-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000, #990000) !important;
    color: white !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

.auc-logout-btn:hover {
    background: linear-gradient(135deg, #cc0000, #990000, #660000) !important;
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Mobile responsive for logged in actions */
@media (max-width: 768px) {
    .auc-logged-in-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .auc-dashboard-btn,
    .auc-logout-btn {
        width: 100%;
        max-width: 200px;
    }
}