/* React Components CSS - Consistent with WPM101 Theme */

/* Import theme colors */
:root {
    --wpm101-primary: #0073aa;
    --wpm101-secondary: #005177;
    --wpm101-accent: #00a0d2;
    --wpm101-light: #f8f9fa;
    --wpm101-dark: #1a1a1a;
    --wpm101-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wpm101-heading-font: 'Segoe UI', system-ui, sans-serif;
}

/* Clean Headers for Auth Pages */
.login-header,
.register-header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 20px 0;
    margin-bottom: 40px;
    font-family: var(--wpm101-font-family);
}

.login-header-container,
.register-header-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.login-header .site-title,
.register-header .site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--wpm101-heading-font);
    color: var(--wpm101-primary);
    text-decoration: none;
}

/* Form Styles */
.login-form-container,
.register-form-container,
.two-factor-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--wpm101-font-family);
}

.login-form,
.register-form,
.two-factor-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: var(--wpm101-font-family);
}

/* Override custom styles when inside Bootstrap card */
.card-body .custom-form {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: var(--wpm101-font-family) !important;
}

/* Use Bootstrap form styling when inside card */
.card-body .custom-form .form-group {
    margin-bottom: 0;
}

.card-body .custom-form .form-group label {
    display: inline-block;
    margin-bottom: 0;
    font-weight: 500;
    font-family: var(--wpm101-font-family);
    color: var(--wpm101-dark);
}

.card-body .custom-form .form-group input,
.card-body .custom-form .form-group select {
    width: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    font-family: var(--wpm101-font-family);
    font-size: inherit;
    transition: none;
}

.card-body .custom-form .form-group input:focus,
.card-body .custom-form .form-group select:focus {
    outline: inherit;
    border-color: var(--wpm101-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-family: var(--wpm101-font-family);
    color: var(--wpm101-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: var(--wpm101-font-family);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--wpm101-primary);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input {
    width: auto;
    margin-right: 8px;
}

.login-button,
.register-button,
.verify-button {
    width: 100%;
    padding: 12px;
    background-color: var(--wpm101-primary, #0073aa);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-button:hover,
.register-button:hover,
.verify-button:hover {
    background-color: var(--wpm101-secondary, #005177);
}

.login-button:disabled,
.register-button:disabled,
.verify-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

.success-message {
    background-color: #efe;
    color: #363;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #cfc;
}

.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links a {
    color: var(--wpm101-primary, #0073aa);
    text-decoration: none;
}

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

/* Two Factor Specific */
.code-input {
    text-align: center;
    font-size: 24px;
    font-family: monospace;
    letter-spacing: 4px;
}

/* Session Timeout Modal */
.session-timeout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-timeout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.session-timeout-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.session-timeout-content h3 {
    margin-top: 0;
    color: #d63638;
}

.session-timeout-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--wpm101-primary, #0073aa);
    color: white;
}

.btn-primary:hover {
    background-color: var(--wpm101-secondary, #005177);
}

.btn-secondary {
    background-color: #666;
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
}

/* Admin Components */
.security-log-container {
    max-width: 100%;
    margin: 20px 0;
}

.security-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clear-log-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.clear-log-btn:hover {
    background-color: #c82333;
}

.clear-log-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.security-log-table-container {
    overflow-x: auto;
}

.security-log-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.security-log-table th,
.security-log-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.security-log-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.event-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.event-user-login { background-color: #d4edda; color: #155724; }
.event-login-failed { background-color: #f8d7da; color: #721c24; }
.event-user-logout { background-color: #d1ecf1; color: #0c5460; }
.event-2fa-success { background-color: #d4edda; color: #155724; }
.event-2fa-failed { background-color: #f8d7da; color: #721c24; }
.event-oauth-token { background-color: #fff3cd; color: #856404; }
.event-oauth-failed { background-color: #f8d7da; color: #721c24; }

.no-logs {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Theme Customizer */
.theme-customizer-container {
    max-width: 800px;
    margin: 20px 0;
}

.theme-customizer-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.color-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-text-input {
    flex: 1;
    font-family: monospace;
}

.theme-preview {
    margin: 30px 0;
}

.preview-box {
    transition: all 0.3s ease;
}

.save-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* Admin Dashboard */
.admin-dashboard-container {
    margin: 20px 0;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--wpm101-primary, #0073aa);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.security-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background: #f8f9fa;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-active .status-indicator {
    background-color: #28a745;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-button {
    display: block;
    padding: 12px;
    background: var(--wpm101-primary, #0073aa);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s;
}

.action-button:hover {
    background-color: var(--wpm101-secondary, #005177);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .session-timeout-actions {
        flex-direction: column;
    }
    
    .color-controls {
        grid-template-columns: 1fr;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Site Footer */
.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    padding: 40px 0 20px;
    margin-top: 60px;
    text-align: center;
    color: #6c757d;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    color: var(--wpm101-primary, #0073aa);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #005177;
    text-decoration: underline;
}

.footer-content a {
    color: var(--wpm101-primary, #0073aa);
    text-decoration: none;
}

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

