/* Modern Professional Quiz Table Styles */
.wn-quiz-container {
    max-width: 1200px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wn-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
}

.wn-quiz-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wn-quiz-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0;
}

#wn_qsr_table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#wn_qsr_table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#wn_qsr_table thead th {
    padding: 18px 15px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
}

#wn_qsr_table thead th:first-child {
    border-top-left-radius: 12px;
}

#wn_qsr_table thead th:last-child {
    border-top-right-radius: 12px;
}

#wn_qsr_table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e8ecef;
    position: relative;
}

#wn_qsr_table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

#wn_qsr_table tbody tr:last-child {
    border-bottom: none;
}

#wn_qsr_table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#wn_qsr_table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

#wn_qsr_table td {
    padding: 18px 15px;
    vertical-align: middle;
    border: none;
    font-size: 0.95rem;
}

#wn_qsr_table td:first-child {
    font-weight: 600;
    color: #2c3e50;
    border-left: 3px solid transparent;
}

#wn_qsr_table tr:hover td:first-child {
    border-left-color: #667eea;
}

#wn_qsr_table td:nth-child(2) {
    color: #34495e;
    position: relative;
}

.quiz-diamond-icon {
    margin-right: 8px !important;
    color: #667eea;
    font-size: 16px;
    font-weight: bold;
}

#wn_qsr_table td:last-child {
    text-align: center !important;
    padding: 15px !important;
    vertical-align: middle !important;
    width: 250px;
}

/* Force button centering */
#wn_qsr_table td:last-child a {
    display: inline-block !important;
    margin: 0 auto !important;
}

/* Modern Button Styles */
#wn_qsr_start_btn, #wn_qsr_resume_btn {
    display: inline-block !important;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 130px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-align: center !important;
    margin: 0 !important;
}

#wn_qsr_start_btn:before, #wn_qsr_resume_btn: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;
}

#wn_qsr_start_btn:hover:before, #wn_qsr_resume_btn:hover:before {
    left: 100%;
}

#wn_qsr_start_btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white !important;
}

#wn_qsr_start_btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

#wn_qsr_resume_btn {
    background: linear-gradient(135deg, #4834d4 0%, #667eea 100%);
    color: white !important;
}

#wn_qsr_resume_btn:hover {
    background: linear-gradient(135deg, #3742fa 0%, #5742f5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 52, 212, 0.4);
}

.dashicons {
    margin-right: 6px !important;
    font-size: 16px;
    margin-top: 5px;
}

/* Progress Indicators */
.quiz-progress-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
}

.progress-not-started {
    background: #e74c3c;
}

.progress-in-progress {
    background: #f39c12;
    animation: pulse 2s infinite;
}

.progress-completed {
    background: #27ae60;
}

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

/* Badge Styles */
.quiz-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

.badge-new {
    background: #e8f5e8;
    color: #27ae60;
}

.badge-progress {
    background: #fff3cd;
    color: #856404;
}

.badge-failed {
    background: #f8d7da;
    color: #721c24;
}

.badge-completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wn-quiz-container {
        margin: 10px;
        padding: 20px;
    }
    
    .wn-quiz-header h2 {
        font-size: 1.5rem;
    }
    
    #wn_qsr_table {
        font-size: 0.9rem;
    }
    
    #wn_qsr_table thead th,
    #wn_qsr_table td {
        padding: 12px 8px;
    }
    
    #wn_qsr_start_btn, #wn_qsr_resume_btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-width: 110px;
    }
    
    .wn-quiz-header h2 {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    #wn_qsr_table thead th:first-child,
    #wn_qsr_table td:first-child {
        display: none;
    }
    
    #wn_qsr_table td:nth-child(2):before {
        content: "📝 ";
    }
}

/* Loading Animation */
.quiz-table-loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Accessibility Improvements */
#wn_qsr_start_btn:focus, #wn_qsr_resume_btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

#wn_qsr_table tbody tr:focus-within {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    outline: 2px solid #667eea;
    outline-offset: -2px;
}