/**
 * AI Quiz Generator WordPress Plugin Styles
 * Version: 1.0.0
 */

/* Main Container Styles */
.ai-quiz-generator-container {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
    margin: 20px 0;
}

.ai-quiz-generator-container iframe {
    border: none;
    border-radius: 8px;
    display: block;
    width: 100%;
    transition: opacity 0.3s ease;
}

/* Login/Register Form Styles */
.ai-quiz-login-form,
.ai-quiz-register-form {
    margin: 20px auto;
    max-width: 500px;
}

.ai-quiz-login-form iframe,
.ai-quiz-register-form iframe {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Login Required Message */
.ai-quiz-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

.ai-quiz-login-required p {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 16px;
}

.ai-quiz-login-required .button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.ai-quiz-login-required .button:hover {
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Loading States */
.ai-quiz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ai-quiz-loading::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: ai-quiz-spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ai-quiz-generator-container {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .ai-quiz-login-form,
    .ai-quiz-register-form {
        margin: 10px;
        max-width: none;
    }
    
    .ai-quiz-login-required {
        padding: 20px 15px;
    }
}

/* WordPress Admin Styles */
.ai-quiz-admin-container {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.ai-quiz-admin-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ai-quiz-admin-header h2 {
    margin: 0;
    color: #1d2327;
}

.ai-quiz-admin-header .dashicons {
    margin-right: 10px;
    color: #667eea;
}

/* Settings Form Styles */
.ai-quiz-settings-form .form-table th {
    width: 200px;
    padding-left: 0;
}

.ai-quiz-settings-form .regular-text {
    width: 400px;
}

.ai-quiz-test-connection {
    margin-left: 10px;
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.ai-quiz-test-connection:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

/* Status Indicators */
.ai-quiz-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ai-quiz-status.connected {
    background: #d4edda;
    color: #155724;
}

.ai-quiz-status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.ai-quiz-status.testing {
    background: #fff3cd;
    color: #856404;
}

/* Shortcode Examples */
.ai-quiz-shortcode-examples {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #667eea;
    margin: 15px 0;
}

.ai-quiz-shortcode-examples h4 {
    margin-top: 0;
    color: #1d2327;
}

.ai-quiz-shortcode-examples code {
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    border: 1px solid #e1e1e1;
}

/* Notice Styles */
.ai-quiz-notice {
    padding: 12px;
    margin: 5px 0 15px;
    border-left: 4px solid;
    background: #fff;
}

.ai-quiz-notice.notice-info {
    border-left-color: #72aee6;
    background: #f0f6fc;
}

.ai-quiz-notice.notice-success {
    border-left-color: #00ba37;
    background: #f0fdf4;
}

.ai-quiz-notice.notice-warning {
    border-left-color: #ffb900;
    background: #fffcf0;
}

.ai-quiz-notice.notice-error {
    border-left-color: #d63638;
    background: #fef2f2;
}

/* Button Enhancements */
.ai-quiz-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.ai-quiz-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.ai-quiz-btn:active {
    transform: translateY(0);
}

/* WordPress Integration Specific */
.ai-quiz-wp-integration {
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #f0f8ff;
}

.ai-quiz-wp-integration h3 {
    color: #0073aa;
    margin-top: 0;
}

.ai-quiz-sync-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.ai-quiz-sync-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ai-quiz-sync-indicator.synced {
    background: #00ba37;
}

.ai-quiz-sync-indicator.not-synced {
    background: #d63638;
}

.ai-quiz-sync-indicator.syncing {
    background: #ffb900;
    animation: ai-quiz-pulse 1.5s infinite;
}

@keyframes ai-quiz-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}