/**
 * CBD Quizes Frontend Styles
 * Bootstrap 5 compatible styling
 * 
 * @package CBD_Quizes
 */

/* Custom Bootstrap overrides */

/* Audio Player Styling - Figma Design */
.cbd-audio-player {
    background: white;
    border-radius: 100px;
    padding: 16px 24px;
    border: 1px solid rgba(40, 62, 126, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 620px;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 0 auto;
}

.cbd-audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.cbd-audio-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.cbd-audio-play-btn:hover {
    background-color: rgba(40, 62, 126, 0.1);
    transform: scale(1.05);
}

.cbd-audio-play-btn svg {
    width: 16px;
    height: 16px;
}

.cbd-audio-play-btn.playing svg path {
    d: path("M6 2H10V14H6V2Z M12 2H16V14H12V2Z");
}

.cbd-audio-time {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #283e7e;
    white-space: nowrap;
    min-width: 90px;
    text-align: left;
    flex-shrink: 0;
}

.cbd-audio-progress-container {
    flex: 1;
    position: relative;
    height: 6px;
    cursor: pointer;
    margin: 0 8px;
}

.cbd-audio-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 62, 126, 0.2);
    border-radius: 50px;
}

.cbd-audio-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0170AC 0%, #014882 100%);
    border-radius: 5px;
    width: 0%;
    transition: width 0.1s ease;
}

.cbd-audio-volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.cbd-audio-volume-btn:hover {
    background-color: rgba(40, 62, 126, 0.1);
    transform: scale(1.05);
}

.cbd-audio-volume-btn svg {
    width: 18px;
    height: 18px;
}

.cbd-audio-volume-btn.muted svg path {
    fill: #999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cbd-audio-player {
        max-width: 100%;
        padding: 12px 16px;
        gap: 12px;
        height: 48px;
    }
    
    .cbd-audio-controls {
        gap: 12px;
    }
    
    .cbd-audio-time {
        font-size: 14px;
        min-width: 75px;
    }
    
    .cbd-audio-play-btn,
    .cbd-audio-volume-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }
    
    .cbd-audio-play-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .cbd-audio-volume-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .cbd-audio-progress-container {
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .cbd-audio-player {
        padding: 10px 12px;
        gap: 8px;
        height: 44px;
    }
    
    .cbd-audio-controls {
        gap: 8px;
    }
    
    .cbd-audio-time {
        font-size: 13px;
        min-width: 65px;
    }
    
    .cbd-audio-play-btn,
    .cbd-audio-volume-btn {
        width: 24px;
        height: 24px;
        padding: 3px;
    }
    
    .cbd-audio-play-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .cbd-audio-volume-btn svg {
        width: 14px;
        height: 14px;
    }
}


/* Quiz Container - Bootstrap Card styling */
.cbd-quiz-container {
    /* Bootstrap card styling is handled by .card class */
}

/* Quiz Header */
.cbd-quiz-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cbd-quiz-header h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Quiz Progress - Bootstrap Progress styling */
.cbd-quiz-progress {
    /* Bootstrap progress styling is handled by .progress class */
}

.quiz-container {
    margin-top:20px; 
padding: 40px 20px;
border-radius: 20px;


}



.quiz-body {
    padding: 40px;
    margin-top: 40px;
    border-radius: 20px;
    background: #fff;
}

@media screen and (min-width: 768px) {
    .quiz-container {
        margin-top:40px; 
        padding: 80px;
        border-radius: 50px;
    }

    .quiz-body { 
        border-radius: 50px;
    }
}

.cbd-progress-text {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #666;
}

.cbd-progress-bar {

    height: 10px !important;
    border-radius: 50px !important;
background: rgba(40, 62, 126, 0.20) !important;
    overflow: hidden !important;

    .progress-bar {
        border-radius: 5px !important;
background: linear-gradient(90deg, #0170AC 0%, #014882 100%) !important;
    }
}

.cbd-progress-fill {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
}

/* Quiz Content */
.cbd-quiz-content {
    /* Bootstrap card-body styling is handled by .card-body class */
    margin-bottom: 30px;
    min-height: 200px;
}

/* Questions */
.cbd-question {
    /* Bootstrap styling is handled by .question-container class */
    margin-bottom: 30px;
}

.cbd-question h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.cbd-question-text {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Question Options - Figma Design Styling */
.question-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 30px !important;
    background-color: #fff;
    border-radius: 20px;
}

@media screen and (min-width: 768px) {
    .question-options {
        padding: 60px !important;
        border-radius: 50px;
    }
}

.cbd-option-item {
    display: flex;
    align-items: center;
    padding: 32px;
    background: #fff;
    border: 1px solid rgba(40, 62, 126, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 0;
    width: 100%;

    &.halfed {
        @media (min-width: 768px) {
           max-width: 49%;
           width: 100%;
        }
    }
}

.cbd-option-item:hover {
    border-color: rgba(40, 62, 126, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 62, 126, 0.1);
}

.cbd-option-item.selected {
    border: 1px solid #283e7e !important;
    background: #fff;
 
}

.cbd-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cbd-option-icon {
    flex-shrink: 0;
    margin-right: 20px;
    /* margin-top: 5px; */
}

.cbd-option-icon svg {
    transition: all 0.3s ease;
}

/* Radio button styling - selected state */
.cbd-option-item.selected .cbd-option-icon svg circle:last-child {
    fill: #283e7e !important;
}

.cbd-option-item.selected .cbd-option-icon svg circle:last-child {
    opacity: 1 !important;
}

/* Radio button styling - unselected state */
.cbd-option-item:not(.selected) .cbd-option-icon svg circle:first-child {
    /* fill: rgba(40, 62, 126, 0.2) !important; */
}

.cbd-option-item:not(.selected) .cbd-option-icon svg circle:last-child {
    opacity: 0 !important;
}

/* Checkbox styling - selected state */
.cbd-option-item.selected .cbd-option-icon svg rect {
    fill: #283e7e !important;
    stroke: #283e7e !important;
}

.cbd-option-item.selected .cbd-option-icon svg path {
    opacity: 1 !important;
}

/* Checkbox styling - unselected state */
.cbd-option-item:not(.selected) .cbd-option-icon svg rect {
    fill: rgba(40, 62, 126, 0.2) !important;
    stroke: rgba(40, 62, 126, 0.2) !important;
}

.cbd-option-item:not(.selected) .cbd-option-icon svg path {
    opacity: 0 !important;
}

.cbd-option-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.cbd-option-text {
   
    color: #283e7e;

}

/* Quiz Actions - Bootstrap Button styling */
.cbd-quiz-actions {
    /* Bootstrap button styling is handled by .btn classes */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cbd-quiz-actions button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cbd-quiz-actions .cbd-start-quiz {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.cbd-quiz-actions .cbd-start-quiz:hover {
    background: #005a87;
    border-color: #005a87;
}

.cbd-quiz-actions .cbd-next-question,
.cbd-quiz-actions .cbd-prev-question {
    background: #fff;
    color: #333;
    border-color: #e0e0e0;
}

.cbd-quiz-actions .cbd-next-question:hover,
.cbd-quiz-actions .cbd-prev-question:hover {
    background: #f5f5f5;
}

.cbd-quiz-actions .cbd-submit-quiz {
    background: #46b450;
    color: white;
    border-color: #46b450;
}

.cbd-quiz-actions .cbd-submit-quiz:hover {
    background: #389a3f;
    border-color: #389a3f;
}

/* Quiz Results - Bootstrap Alert styling */
.cbd-quiz-results {
    /* Bootstrap alert styling is handled by .alert class */
    text-align: center;
    padding: 40px 20px;
}

.cbd-quiz-results h3 {
    margin: 0 0 20px 0;
    color: #46b450;
    font-size: 28px;
    font-weight: 600;
}

.cbd-quiz-results p {
    margin: 10px 0;
    font-size: 18px;
    color: #555;
}

.cbd-quiz-results strong {
    color: #0073aa;
    font-weight: 700;
}

/* Quiz Error - Bootstrap Alert styling */
.cbd-quiz-error {
    /* Bootstrap alert styling is handled by .alert class */
    text-align: center;
    padding: 40px 20px;
}

.cbd-error-message {
    color: #dc3232;
    font-size: 18px;
    font-weight: 600;
}

/* Registration Form - Bootstrap Form styling */
.cbd-registration-form {
    /* Bootstrap form styling is handled by .form-control classes */
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.cbd-registration-form h3 {
    margin: 0 0 25px 0;
    text-align: center;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

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

.cbd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cbd-form-group input,
.cbd-form-group textarea,
.cbd-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.cbd-form-group input:focus,
.cbd-form-group textarea:focus,
.cbd-form-group select:focus {
    outline: none;
    border-color: #0073aa;
}

.cbd-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.cbd-form-submit {
    width: 100%;
    padding: 15px;
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.cbd-form-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Registration Messages - Bootstrap Alert styling */
.cbd-registration-messages {
    /* Bootstrap alert styling is handled by .alert class */
    margin-top: 20px;
}

.cbd-success-message {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.cbd-error-message {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Quiz Access Control - Bootstrap Alert styling */
.cbd-quiz-access-denied {
    /* Bootstrap alert styling is handled by .alert class */
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.cbd-quiz-access-denied .cbd-message {
    text-align: center;
    padding: 30px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.cbd-quiz-access-denied h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 1.5em;
    font-weight: 600;
}

.cbd-quiz-access-denied p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    line-height: 1.5;
}

.cbd-quiz-access-denied .button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1em;
    text-decoration: none;
    border: 1px solid;
    transition: background-color 0.2s ease;
}

.cbd-quiz-access-denied .button-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.cbd-quiz-access-denied .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: white;
}

/* Info box styling for settings page */
.cbd-info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    padding: 15px;
    margin: 20px 0;
}

.cbd-info-box p {
    margin: 5px 0;
}

.cbd-info-box ul {
    margin: 10px 0 0 20px;
}

.cbd-info-box li {
    margin: 3px 0;
}

/* Quiz Page Styles (from single-quiz.php) */
.cbd-quiz-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cbd-quiz-page-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.cbd-quiz-article {
    margin: 0;
}

.cbd-quiz-page-header {
    background: #0073aa;
    color: #fff;
    padding: 40px 30px;
    text-align: center;
}

.cbd-quiz-page-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
}

.cbd-quiz-page-excerpt {
    font-size: 1.2em;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.cbd-quiz-page-body {
    padding: 40px 30px;
}

.cbd-quiz-page-thumbnail {
    text-align: center;
    margin-bottom: 30px;
}

.cbd-quiz-featured-image {
    max-width: 100%;
    height: auto;
}

.cbd-quiz-page-description {
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
    margin-bottom: 40px;
}

.cbd-quiz-page-description p {
    margin-bottom: 1.2em;
}

.cbd-quiz-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.cbd-quiz-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Quiz Completion Styles */
.cbd-quiz-completed {
    text-align: center;
    padding: 30px;
    background: #fff;
}

.cbd-completion-message {
    max-width: 500px;
    margin: 0 auto;
}

.cbd-completion-icon {
    margin-bottom: 20px;
}

.cbd-completion-icon .material-symbols-rounded {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #46b450;
    background: #f0f9ff;
    padding: 15px;
}

.cbd-completion-content h3 {
}

.cbd-completion-text {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.cbd-completion-stats {
    margin-top: 60px;
    margin-bottom: 40px;
    border-radius: 20px;
border: 1px solid rgba(40, 62, 126, 0.20);
padding: 38px 32px !important;
background: #FFF;
}

.cbd-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.cbd-stat-item:last-child {
    border-bottom: none;
}

.cbd-stat-item strong {
    color: #333;
}

.cbd-stat-item span {
    color: #666;
    font-weight: 500;
}

/* Quiz List Styles */
.cbd-quiz-list {
    display: grid;
    gap: 20px;
}

.cbd-quiz-list-item {
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #f8f9fa;
    transition: border-color 0.3s ease;
}

.cbd-quiz-list-item:hover {
    border-color: #0073aa;
}

.cbd-quiz-list-item.cbd-quiz-completed {
    border-color: #28a745;
    background: #f8fff9;
}

.cbd-quiz-list-item.cbd-quiz-started {
    border-color: #ffc107;
    background: #fffef8;
}

.cbd-quiz-list-title {
    margin: 0 0 10px 0;
}

.cbd-quiz-list-title a {
    color: #0073aa;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
}

.cbd-quiz-list-title a:hover {
    color: #005177;
}

.cbd-quiz-list-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 15px;
}

.cbd-quiz-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
    gap: 10px;
}

.cbd-quiz-question-count {
    background: #e9ecef;
    padding: 2px 6px;
}

.cbd-quiz-deadline {
    color: #6c757d;
}

.cbd-quiz-list-actions {
    display: flex;
    justify-content: flex-end;
}

.cbd-status-badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.cbd-status-completed {
    background-color: #d4edda;
    color: #155724;
}

.cbd-status-started {
    background-color: #fff3cd;
    color: #856404;
}

.cbd-btn-warning {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.cbd-btn-warning:hover {
    background: #e0a800;
    color: #212529;
    border-color: #e0a800;
}

/* Standalone Registration Styles */
.cbd-standalone-registration {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.cbd-form-container {
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e5e9;
}

.cbd-form-container h3 {
    margin: 0 0 25px 0;
    text-align: center;
    color: #23282d;
    font-size: 1.5em;
    border-bottom: 1px solid #0073aa;
    padding-bottom: 10px;
    font-weight: 600;
}

.cbd-form-container h4 {
    margin: 25px 0 15px 0;
    color: #23282d;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    font-weight: 600;
}

.cbd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cbd-form-field {
    margin-bottom: 20px;
}

.cbd-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #23282d;
}

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

.cbd-form-field input:focus {
    outline: none;
    border-color: #0073aa;
}

.cbd-form-field input[type="checkbox"] {
    margin-right: 8px;
}

.cbd-form-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.required {
    color: #dc3545;
}

.cbd-form-actions {
    margin-top: 25px;
}

.cbd-btn {
    padding: 12px 24px;
    border: 1px solid;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cbd-btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.cbd-btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.cbd-btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.cbd-btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.cbd-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.cbd-form-footer {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cbd-form-footer p {
    margin: 0;
    color: #666;
}

.cbd-form-footer a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

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

.cbd-message {
    padding: 12px;
    margin: 15px 0;
}

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

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

/* Auth Tabs Styles */
.cbd-auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.cbd-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
}

.cbd-tab-btn.active {
    color: #0073aa;
    border-bottom: 1px solid #0073aa;
    margin-bottom: -1px;
}

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

.cbd-tab-pane {
    display: none;
}

.cbd-tab-pane.active {
    display: block;
}

/* Logged In Area Styles */
.cbd-logged-in-area {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.cbd-user-welcome h3 {
    margin-top: 0;
    color: #28a745;
    font-size: 1.5em;
    font-weight: 600;
}

.cbd-user-welcome p {
    color: #6c757d;
    margin-bottom: 25px;
}

.cbd-logout-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cbd-logout-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

.cbd-logout-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

/* Dashboard Styles */
.cbd-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cbd-dashboard-header {
    background: #0073aa;
    color: white;
    padding: 40px 30px;
    margin-bottom: 30px;
    text-align: center;
}

.cbd-dashboard-header h2 {
    margin: 0 0 10px 0;
    font-size: 2em;
    font-weight: 600;
}

.cbd-dashboard-header p {
    margin: 0;
}

.cbd-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cbd-stat-card {
    background: #fff;
    padding: 25px;
    text-align: center;
    border: 1px solid #e1e5e9;
}

.cbd-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #0073aa;
    line-height: 1;
}

.cbd-stat-label {
    margin-top: 8px;
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tab Navigation */
.cbd-dashboard-tabs {
    background: #fff;
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.cbd-tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    overflow-x: auto;
}

.cbd-tab-btn {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    position: relative;
}

.cbd-tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.cbd-tab-btn.active {
    background: #fff;
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.cbd-tab-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0073aa;
}

.cbd-tab-content {
    min-height: 400px;
}

.cbd-tab-panel {
    display: none;
    padding: 30px;
}

.cbd-tab-panel.active {
    display: block;
}

/* Quick Actions */
.cbd-quick-actions {
    margin: 30px 0;
}

.cbd-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.cbd-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: #fff;
    border: 1px solid #e1e5e9;
    cursor: pointer;
    transition: border-color 0.3s ease;
    text-align: left;
}

.cbd-action-card:hover {
    background: #f8f9fa;
    border-color: #0073aa;
}

.cbd-action-arrow {
    font-size: 18px;
    color: #0073aa;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.cbd-action-card:hover .cbd-action-arrow {
    transform: translateX(4px);
}

.cbd-action-text strong {
    display: block;
    color: #23282d;
    margin-bottom: 4px;
}

.cbd-action-text span {
    color: #666;
    font-size: 0.9em;
}

/* Recent Activity */
.cbd-recent-activity {
    margin-top: 30px;
}

.cbd-activity-list {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

.cbd-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
}

.cbd-activity-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cbd-activity-status.completed {
    background: #28a745;
}

.cbd-activity-status.pending {
    background: #ffc107;
}

.cbd-activity-content strong {
    display: block;
    color: #23282d;
}

.cbd-activity-content span {
    color: #666;
    font-size: 0.9em;
}

.cbd-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.cbd-link:hover {
    text-decoration: underline;
}

/* Quiz Cards Enhanced */
.cbd-quiz-difficulty {
    margin-left: 10px;
}

.cbd-difficulty-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbd-btn-block {
    width: 100%;
}

/* History Table */
.cbd-history-header {
    margin-bottom: 30px;
}

.cbd-history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.cbd-stat-mini {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
}

.cbd-stat-mini strong {
    display: block;
    font-size: 1.5em;
    color: #0073aa;
    margin-bottom: 5px;
}

.cbd-stat-mini span {
    color: #666;
    font-size: 0.9em;
}

.cbd-attempts-table {
    background: #fff;
    overflow: hidden;
}

.cbd-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    color: #23282d;
}

.cbd-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
    align-items: center;
}

.cbd-table-row:hover {
    background: #f8f9fa;
}

.cbd-score-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
}

.cbd-date {
    color: #666;
    font-size: 0.9em;
}

/* Account Info */
.cbd-info-card {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e1e5e9;
    margin-bottom: 30px;
}

.cbd-info-card h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-weight: 600;
}

.cbd-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.cbd-info-row:last-child {
    border-bottom: none;
}

.cbd-info-label {
    font-weight: 600;
    color: #666;
}

.cbd-info-value {
    color: #23282d;
}

.cbd-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Empty States */
.cbd-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    margin: 20px 0;
}

.cbd-empty-state h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-weight: 600;
}

.cbd-empty-state p {
    margin: 0 0 20px 0;
    line-height: 1.5;
    color: #6c757d;
}

.cbd-dashboard-section {
    background: #fff;
    padding: 25px;
    border: 1px solid #e1e5e9;
}

.cbd-dashboard-section h3 {
    margin: 0 0 20px 0;
    color: #23282d;
    border-bottom: 1px solid #0073aa;
    padding-bottom: 10px;
    font-weight: 600;
}

.cbd-quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cbd-quiz-card {
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #f8f9fa;
    transition: border-color 0.3s ease;
}

.cbd-quiz-card:hover {
    border-color: #0073aa;
}

.cbd-quiz-card.cbd-quiz-completed {
    border-color: #28a745;
    background: #f8fff9;
}

.cbd-quiz-card.cbd-quiz-started {
    border-color: #ffc107;
    background: #fffef8;
}

.cbd-quiz-card h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-weight: 600;
}

.cbd-attempts-list {
    display: grid;
    gap: 15px;
}

.cbd-attempt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.cbd-attempt-info strong {
    display: block;
    color: #23282d;
}

.cbd-attempt-score {
    font-size: 0.9em;
    color: #666;
}

.cbd-attempt-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cbd-attempt-date {
    font-size: 0.9em;
    color: #666;
}

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

.cbd-btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.cbd-btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbd-quiz-container {
        margin: 10px;
        padding: 15px;
    }
    
    .cbd-quiz-header h2 {
        font-size: 20px;
    }
    
    .cbd-question h3 {
        font-size: 18px;
    }
    
    .cbd-question-text {
        font-size: 15px;
    }
    
    .cbd-option-item {
        padding: 15px;
        min-height: 80px;
    }
    
    .cbd-option-icon {
        margin-right: 15px;
    }
    
    .cbd-option-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .cbd-option-text {
        font-size: 14px;
    }
    
    .cbd-quiz-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .cbd-quiz-actions button {
        width: 100%;
    }
    
    .cbd-registration-form {
        margin: 10px;
        padding: 20px;
    }
    
    .cbd-quiz-page-container {
        padding: 10px;
    }
    
    .cbd-quiz-page-header {
        padding: 30px 20px;
    }
    
    .cbd-quiz-page-title {
        font-size: 2em;
    }
    
    .cbd-quiz-page-body {
        padding: 30px 20px;
    }
    
    .cbd-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .cbd-standalone-registration,
    .cbd-login-container {
        margin: 5px;
        padding: 15px;
    }
    
    .cbd-btn {
        width: 100%;
        padding: 14px;
    }
    
    .cbd-user-dashboard {
        padding: 10px;
    }
    
    .cbd-dashboard-header {
        padding: 20px;
    }
    
    .cbd-dashboard-header h2 {
        font-size: 1.5em;
    }
    
    .cbd-tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cbd-tab-btn {
        padding: 16px 20px;
        font-size: 14px;
    }
    
    .cbd-tab-btn.active::before {
        width: 3px;
    }
    
    .cbd-tab-panel {
        padding: 20px 15px;
    }
    
    .cbd-action-grid {
        grid-template-columns: 1fr;
    }
    
    .cbd-quiz-grid {
        grid-template-columns: 1fr;
    }
    
    .cbd-history-stats {
        grid-template-columns: 1fr;
    }
    
    .cbd-table-header,
    .cbd-table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cbd-table-header {
        display: none;
    }
    
    .cbd-table-row {
        display: block;
        padding: 15px;
        border: 1px solid #e1e5e9;
        margin-bottom: 10px;
    }
    
    .cbd-table-col {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .cbd-table-col:last-child {
        border-bottom: none;
    }
    
    .cbd-table-col:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
    
    .cbd-action-buttons {
        flex-direction: column;
    }
    
    .cbd-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .cbd-quiz-page-title {
        font-size: 1.8em;
    }
    
    .cbd-quiz-page-excerpt {
        font-size: 1.1em;
    }
}

/* Loading States */
.cbd-loading {
    text-align: center;
    padding: 40px 20px;
}

.cbd-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Utility Classes */
.cbd-text-center {
    text-align: center;
}

.cbd-mt-20 {
    margin-top: 20px;
}

.cbd-mb-20 {
    margin-bottom: 20px;
}

.cbd-hidden {
    display: none;
}

.cbd-visible {
    display: block;
}
