/* =======================Header====================== */
.qb-header {
    background: #fff;
    width: 100%;
    display: block;
}

.qb-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Force full width up to 1400px */
.qb-header,
.qb-header-container {
    min-width: 100%;
    margin-top: 8px;
    margin-bottom: 4px;
    height: 40px;
}

/* When screen width exceeds 1400px, set to 90% */
@media (min-width: 1401px) {
    .qb-header-container {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }
}

.qb-header-left {
    flex-shrink: 0;
}

.qb-header-left .qb-site-name {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
}

.qb-header-right {
    flex-shrink: 0;
}

.qb-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* User Dropdown Styles */
.qb-user-dropdown {
    position: relative;
    display: inline-block;
}


.qb-username {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
    padding: 5px;
}

.qb-user-avatar img {
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.qb-dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.3s ease;
}

.qb-user-dropdown:hover .qb-dropdown-arrow {
    transform: rotate(180deg);
}

.qb-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 180px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.qb-user-dropdown:hover .qb-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qb-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.qb-dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.qb-dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.qb-dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

/* Login/Logout button for non-logged in users */
.qb-loginout {
    background: #3498db;
    color: white;
    padding: 3px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.qb-loginout:hover {
    background: #2980b9;
    color: white;
}

/* Ensure the question bank container has proper spacing */
.qb-question-bank-container {
    max-width: 1400px;
    margin: 20px auto 0 auto;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

/* When screen width exceeds 1400px, set question bank to 90% too */
@media (min-width: 1401px) {
    .qb-question-bank-container {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }

}

/* ======================= Mobile Responsive ====================== */

/* Tablet */
@media (max-width: 1024px) {
    .qb-header-container {
        padding: 0 15px;
    }
    
    .qb-header-left .qb-site-name {
        font-size: 20px;
    }
    
    .qb-dropdown-menu {
        min-width: 160px;
    }
    .qb-user-mode-indicator {
        display: none !important;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .qb-header {
        padding: 12px 0;
    }
    
    .qb-header-container {
        padding: 0 15px;
    }
    
    .qb-header-left .qb-site-name {
        font-size: 18px;
    }
    

    
    .qb-username {
        font-size: 13px;
        display: none; /* Hide username on mobile */
    }
    
    .qb-user-avatar img {
        width: 28px;
        height: 28px;
    }
    
    .qb-dropdown-menu {
        right: -10px;
        min-width: 150px;
    }
    
    .qb-loginout {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .qb-header {
        padding: 10px 0;
        margin-bottom: 0px;
    }
    
    .qb-header-container {
        padding: 0 12px;
    }
    
    .qb-header-left .qb-site-name {
        font-size: 16px;
    }
    
    
    .qb-user-avatar img {
        width: 24px;
        height: 24px;
    }
    
    .qb-dropdown-menu {
        min-width: 140px;
        right: -15px;
    }
    
    .qb-dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .qb-loginout {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .qb-header-container {
        padding: 0 10px;
    }
    
    .qb-header-left .qb-site-name {
        font-size: 15px;
    }
    
    .qb-dropdown-trigger {
        padding: 4px 6px;
    }
    
    .qb-user-avatar img {
        width: 22px;
        height: 22px;
    }
    
    .qb-dropdown-menu {
        min-width: 130px;
    }
    
    .qb-loginout {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Ensure question bank container is also responsive */
@media (max-width: 768px) {
    .qb-question-bank-container {
        padding: 0 15px;
        margin: 15px auto 0 auto;
    }
}

@media (max-width: 480px) {
    .qb-question-bank-container {
        padding: 0 12px;
        margin: 12px auto 0 auto;
    }
}

@media (max-width: 360px) {
    .qb-question-bank-container {
        padding: 0 10px;
        margin: 10px auto 0 auto;
    }
}


.qb-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.qb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.qb-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    z-index: 10000;
}

.qb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.qb-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.qb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb-modal-close:hover {
    color: #e74c3c;
}

.qb-input-group {
    margin-bottom: 20px;
}

.qb-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.qb-input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.qb-modal-submit {
    width: 100%;
    background: #3498db;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.qb-modal-submit:hover {
    background: #2980b9;
}


/* Mobile Responsive for Modal */
@media (max-width: 480px) {
    .qb-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .qb-modal-header h3 {
        font-size: 18px;
    }
    
    .qb-input-group input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .qb-modal-submit {
        padding: 10px;
        font-size: 14px;
    }
}







/* ==================Main CSS==================== */
.qb-filters {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.qb-filter,
.qb-search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
}

.qb-search-box button {
    padding: 8px 15px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.qb-free-filter {
    margin-top: 10px;
}

.qb-question-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.qb-question-preview {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.qb-free-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
}


.qb-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.qb-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.qb-tab-pane {
    display: none;
    padding: 0px 10px;
    background: white;
    border-radius: 8px;
    min-height: 400px;
}

.qb-tab-pane.active {
    display: block;
}

.qb-export-btn,
.qb-mytest-btn,
.qb-print-btn,
.qb-print-setings-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.qb-export-btn:hover,
.qb-mytest-btn:hover,
.qb-print-btn:hover,
.qb-print-setings-btn:hover {
    background: #005a87;
}


.qb-no-questions {
    font-size: 13px;
}


@media (max-width: 1024px) {
    .qb-question-bank-container {
        flex-direction: column;
    }
    
    .qb-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .qb-question-bank-container {
        padding: 10px;
        padding-top: 0;

    }
    
    .qb-export-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qb-export-limit {
        margin-left: 0;
        text-align: center;
    }

    .qb-user-mode-indicator {
        display: none !important;
    }
}

.qb-login-required {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}




/* =============================New=================================== */

/* Top Horizontal Filters */
.qb-top-filters {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 20px 10px 20px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qb-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid #f0f0f0;
    height: 20px;
}

.qb-filters-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
}

.qb-filter-controls {
    display: flex;
    gap: 10px;
}

.qb-toggle-btn, .qb-reset-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none !important;
}

.qb-toggle-btn:hover, .qb-reset-btn:hover {
    background: #e1ecff;
    border-color: #adb5bd;
}

.qb-toggle-btn, .qb-apply-btn {
    padding: 6px 26px;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none !important;
}

.qb-search-group {
        grid-column: span 2;
    }

.qb-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px 15px;
}

.qb-filter-group {
    display: flex;
    flex-direction: column;
     margin-bottom: 0px;
}

.qb-filter-group label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.qb-filter-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #495057;
    font-size: 13px;
}
.qb-filter-xlabel {
    font-size: 16px;
}

.qb-filter {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.qb-filter:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}


.qb-search-box {
    display: flex;
    gap: 8px;
}

.qb-search-box input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;  
}

.qb-search-box input:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2) !important;
    border-color: #007cba !important;
}

.qb-search-button {
    padding: 10px 16px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qb-search-button:hover {
    background: #b2b7bd;
}

.qb-free-group {
    align-items: center;
}

.qb-free-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qb-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.qb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.qb-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.qb-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .qb-slider {
    background-color: #28a745;
}

input:checked + .qb-slider:before {
    transform: translateX(26px);
}

.qb-free-label {
    font-size: 13px;
    color: #495057;
	margin-bottom: 6px;
}

.qb-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Main Content Layout  275*/
.qb-main-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}


.qb-question-bank-container {
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    
}

.qb-sidebar {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
	min-height: 707px;
    max-height: 707px;
    /* min-width: 285px; */
	min-width: 330px;
    flex-shrink: 0;
    padding-bottom: 10px;
}

.qb-question-list {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    padding: 10px 0px 0px 10px;
}


.qb-list-header {
    padding: 0px 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    margin-right: 10px;
}

.qb-list-header h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.qb-question-count {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.9em;
}

.qb-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qb-sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.qb-sort-options select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    border-radius: 4px;
}

.qb-bulk-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
	margin-bottom: 16px;
    outline: none !important;
}

/* Question Items */
#qb-questions-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.qb-question-item {
    padding: 0px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 8px;
    margin-right: 10px;
    outline: none !important;
}

.qb-question-item:hover {
    background: #f8f9fa;
    border-color: #0073aa;
}

.qb-question-item.active {
    background: #e7f3ff;
    border-color: #0073aa;
}

.qb-question-item.focus {
    outline: none !important;
    box-shadow: none !important;
}
:where(.wp-site-blocks :focus) {
  outline-style: none;
  outline: none !important;
}

.qb-question-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
}

div .question-headerX{
    display: block;
}

.qb-question-title {
    flex: 1;
    font-weight: 200;
    color: #2c3e50;
    line-height: 1.3;
}

.qb-free-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 9px;
    margin-left: 8px;
    font-weight: 600;
}

.qb-difficulty-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
}


.qb-question-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.qb-meta-subject, .qb-meta-topic, .qb-meta-year {
    padding: 2px 8px;
    background: #ffffff;
    border-radius: 4px;
    font-size: 11px;
    color: #495057;
}

.qb-question-preview {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.qb-question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6c757d;
}

.qb-quick-view {
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qb-quick-view:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Content Area */
.qb-content-area {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.qb-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.qb-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #ddd;
}

.qb-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
    outline: none !important;
}

.qb-tab.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: white;
    background: #e1ecff;
}

.qb-tab:hover {
    color: #005a87;
    background: #e1ecff;
}

.qb-display-actions {
    font-size: 13px;
    color: #6c757d;
    padding: 6px 20px;
    border: 1px #171717 dashed;
    background: #e1ecff;
}

/* Tab Content */
.qb-tab-content {
    padding: 0;
    min-height: 400px;
}

.qb-tab-pane.active {
    display: block;
}

.qb-placeholder {
    text-align: center;
    padding: 120px 20px;
    color: #6c757d;
}

.qb-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.qb-placeholder h3 {
    margin: 0 0 8px 0;
    color: #495057;
}

.qb-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* Export Options */
.qb-export-options {
    border-top: 1px solid #ddd;
    background: #ffffff;
    padding: 14px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.qb-export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qb-export-header h4 {
    margin: 0;
    color: #2c3e50;
    line-height: 1;
}

.qb-export-limit {
    text-align: center;
    font-size: 11px;
    color: #fff;
    padding: 2px 4px;
    margin-left: 5px;
    background-color: #ff7929; /* #27ae60 */
    border-radius: 3px;
}

.qb-export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qb-test-update-btn, .qb-test-update-cancel-btn  {
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: black;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none !important;
}
.qb-test-update-btn:hover {
    background: #aa3030;;
    color: white;
}

.qb-test-update-cancel-btn:hover {
    background: #868080;;
    color: white;
}


.qb-export-btn, 
.qb-print-btn, 
.qb-save-btn, 
.qb-mytest-btn, 
.qb-print-setings-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    color: black;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    outline: none !important;
}

.qb-export-btn:hover, 
.qb-print-btn:hover, 
.qb-save-btn:hover, 
.qb-mytest-btn:hover, 
.qb-print-setings-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.qb-save-btn {
    display: flex; /* Show by default */
}

/* Responsive Design */
@media (max-width: 1200px) {
    .qb-main-content {
        grid-template-columns: 1fr;
    }
    
    .qb-filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .qb-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .qb-search-group {
        grid-column: span 1;
    }
    
    .qb-list-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .qb-export-buttons {
        flex-direction: column;
    }
}


/* Maximize/Minimize Button Styles */
.qb-max-window {
    display: flex;
}

.qb-max-window button {
    color: #000000;
    font-size: large;
    border: #1976d2 1px dashed;
    background: #e1ecff;
    padding: 6.5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qb-max-window button:hover {
    background: #9091e2;
    color: white;
}

/* Maximized State Styles */
.qb-maximized .qb-top-filters {
    display: none !important;
}

.qb-maximized .qb-sidebar {
    display: none !important;
}

.qb-maximized .qb-content-area {
    margin-top: 10px;
    width: 100%;
}

.qb-maximized .qb-main-content {
    display: block !important;
    grid-template-columns: none !important;
}

/* Ensure smooth transition */
.qb-content-area {
    transition: margin-top 0.3s ease;
}

/* Responsive adjustments for maximized state */
@media (max-width: 768px) {
    .qb-maximized .qb-content-area {
        margin-top: 5px;
    }
}



/* Maximized State Styles - Full Window Height */
.qb-maximized .qb-question-bank-container {
    height: 100vh;
    margin: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.qb-maximized .qb-main-content {
    display: flex !important;
    flex-direction: column;
    height: calc(100vh - 20px); /* Adjust based on your header height */
    margin-top: 0;
}

.qb-maximized .qb-content-area {
    margin-top: 10px;
    width: 100%;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qb-maximized .qb-question-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.qb-maximized .qb-tab-content {
    flex: 1;
    min-height: auto;
    height: calc(100% - 120px); /* Adjust based on header and export buttons height */
}

.qb-maximized .qb-tab-pane.active {
    height: 100%;
    flex-direction: column;
}

.qb-maximized .qb-a4-container {
    flex: 1;
    height: auto;
    min-height: auto;
    max-height: none;
}

/* Ensure proper scrolling */
.qb-maximized .qb-tab-pane {
    overflow-y: auto;
}

/* Remove any max-height restrictions in maximized mode */
.qb-maximized .qb-sidebar,
.qb-maximized .qb-question-list,
.qb-maximized .qb-tab-content,
.qb-maximized .qb-tab-pane {
    max-height: none !important;
}

/* Adjust for header if needed */
.qb-maximized {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: white;
    overflow: hidden;
}

/* Optional: Add a close button for better UX */
.qb-maximized .qb-max-window {
    position: relative;
    z-index: 10000;
}

.qb-maximized .qb-max-window button {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

.qb-maximized .qb-max-window button:hover {
    background: #cc0000;
    border-color: #cc0000;
}


.qb-site-name:hover {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

/* =============UPDATE================= */

/* A4 Page Style for Tab Content */
.qb-tab-content {
    flex: 1;
    padding: 0;
    min-height: 156mm;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
}

.qb-tab-pane {
    display: none;
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.qb-tab-pane.active {
    flex-direction: column;
    align-items: center;
    background: rgb(255, 255, 255);
    min-height: 156mm;
}

/* A4 Page Container */
.qb-a4-container {
    background: white;
    position: relative;
}

/* Single Question View (Question Tab) */
#qb-question-tab .qb-a4-containerX {
    width: 100%;
    min-height: 114mm;
    max-height: 114mm;
    margin: 0 auto;
    padding: 0mm 6mm;
    box-sizing: border-box;
    position: relative;
}

/* Mark Scheme Tab - Multiple Questions */
.qb-mark-scheme-questions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.qb-mark-scheme-question {
    width: 100%;
    border-bottom: 1px solid #ffffff;
    page-break-inside: avoid;
}

.qb-mark-scheme-question:last-child {
    border-bottom: none;
}

/* Worked Solutions Tab - Multiple Answers */
.qb-worked-solutions-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.qb-worked-solution-item {
    width: 100%;
    border-bottom: 1px solid #ffffff;
    page-break-inside: avoid;
}

.qb-worked-solution-item:last-child {
    border-bottom: none;
}

/* Header Styles for A4 Pages */
.qb-mark-scheme-header,
.qb-worked-solutions-header {
    width: 100%;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.qb-mark-scheme-header h3,
.qb-worked-solutions-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
}

.qb-mark-scheme-header p,
.qb-worked-solutions-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.qb-question-content p, 
.qb-answer-content p,
 .qb-solution-content p{
    margin: 0 auto;
    margin-bottom: 30px
}


/* Question Numbering in A4 Layout */
.qb-question-number,
.qb-solution-number {
    font-weight: bold;
    color: #007cba;
    /* color: #8c4f00; */
    font-size: 11px;
    background: #ecf0f1;
    padding: 2px 10px;
    margin-top: 10px;
    border-radius: 4px;
    display: block;
}

/* No Content Styles */
.qb-no-answer,
.qb-no-solution {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
    border: 1px dashed #dee2e6;
}

/* Content Styling for A4 */
.qb-question-content,
.qb-solution-content {
    width: 100%;
}

.qb-question-body,
.qb-solution-answer {
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.qb-question-body p,
.qb-solution-answer p {
    margin-bottom: 15px;
}

.qb-question-body img,
.qb-solution-answer img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

/* Single Question View in A4 */
.qb-content-body {
    line-height: 1.6;
    color: #333;
}


.qb-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
}

/* Print-specific styles */
@media print {
    .qb-a4-container {
        box-shadow: none;
        margin: 0;
        padding: 15mm;
        width: 100%;
        height: 100%;
    }
    
    .qb-mark-scheme-question,
    .qb-worked-solution-item {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .qb-a4-container {
        width: 100%;
        min-height: auto;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .qb-tab-pane {
        padding: 20px 10px;
    }
    
    .qb-a4-container {
        padding: 15px;
        margin: 0 5px;
    }
    
    .qb-mark-scheme-header h3,
    .qb-worked-solutions-header h3 {
        font-size: 20px;
    }
}

/* Scrollbar Styling */
.qb-tab-pane::-webkit-scrollbar {
    width: 8px;
}

.qb-tab-pane::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 4px;
}

.qb-tab-pane::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 4px;
}

.qb-tab-pane::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}



/* ============================================= */

/* Print Settings Dropdown Styles */
.print-settings {
    position: relative;
    display: inline-block;
}

.qb-print-setings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
}

.qb-print-setings-btn:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.print-settings .dropdown-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: white;
    min-width: 140px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.print-settings:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 4px 6px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-align: left;
    font-size: 13px;
    border: none;
    background: none;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #007cba;
    color: #fff;
}

.divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 10px 0;
}

.section-title {
    font-weight: 600;
    color: #3498db;
    text-align: left;
    font-size: 13px;
    margin-bottom: 5px;
}

.my-test-title {
    margin-bottom: 8px;
}

.checkbox-group {
    text-align: left;
    padding: 0;
}

.checkbox-groupX{
    text-align: left;
    padding: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.checkbox-item input {
    margin-right: 10px;
    width: 14px;
    height: 14px;
}

.checkbox-item label {
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    margin: 0;
}

.Xcheckbox-groupX {
    text-align: left;
    padding: 10px 0px 0px 10px;
}


.checkbox-itemX {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.checkbox-itemX input {
    margin-right: 10px;
    width: 14px;
    height: 14px;
}

.checkbox-itemX label {
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    margin: 0;
}



/* Ensure the export buttons container handles the dropdown properly */
.qb-export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .print-settings {
        width: 100%;
    }
    
    .print-settings .dropdown-content {
        left: 0;
        right: 0;
        min-width: auto;
    }
    
    .qb-print-setings-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Remove focus For dropdown and checkboxes items */
.dropdown-item:focus {
    outline: none !important;
    box-shadow: none !important;
}
.checkbox-item input:focus {
    outline: none !important;
    box-shadow: none !important;
}


/* Mobile Responsive: Hide User Mode Indicator */
@media (max-width: 1300px) {
    div.qb-tabs, button.qb-tab {
        font-size: 12px;
    }
}

@media (max-width: 1405px) {
    div.qb-tabs, button.qb-tab {
        font-size: 13px;
    }
}

@media (max-width: 680px) {
    div.qb-tabs, button.qb-tab {
        font-size: 12px;
        padding: 0;
    }
    div.qb-max-window button {
        padding: 0px 0px;
    }
}

@media (max-width: 520px) {
    div.qb-tabs, button.qb-tab {
        font-size: 11px;
        padding: 0;
    }
    div.qb-max-window button {
        padding: 0px 0px;
    }
    .qb-display-actions {
        display: none;
    }
}

@media (max-width: 430px) {
    div.qb-tabs, button.qb-tab {
        font-size: 8px;
        padding: 0;
    }
    div.qb-max-window button {
        padding: 0px 0px;
    }
    .qb-display-actions {
        display: none;
    }
}





/* ========================================= */
/* Save Selected Dropdown Styles */
.save-selected-dropdown {
    position: relative;
    display: inline-block;
}

.save-selected-dropdown .dropdown-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: white;
    min-width: 190px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 12px 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.save-selected-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* My Test Dropdown Styles */
.my-test-dropdown {
    position: relative;
    display: inline-block;
}

.my-test-dropdown .dropdown-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: white;
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* padding: 16px 10px; */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.my-test-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.my-test-dropdown .my-test-dropdown {
    min-width: 200px;
    padding: 16px 10px;
}

.my-test-dropdown .print-dropdown {
    min-width: 160px;
    padding: 12px 10px;
}

/* Input Group Styles */

.test-input {
    width: 90%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.test-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Button Group Styles */
.button-group {
    margin-top: 12px;
}

.save-test-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 0px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    justify-content: center;
}

.save-test-btn:hover {
    background: #005a87;
}



/* Test List Styles */
.test-list {
    display: flex;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    margin-right: 5px;
}

.test-delete-btn {
    border: none;
    height: 28px;
    margin-left: 2px;
    margin-right: 5px;
    border-radius: 10%;
}

.test-list-item {
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-list-item:hover {
    background-color: #e1e4e6;
    color: #007cba;
}

.test-list-item:last-child {
    margin-bottom: 0;
}

/* Manage Tests Button */
.manage-tests-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    justify-content: center;
}

.manage-tests-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Icons */
.save-icon,
.manage-icon {
    font-size: 14px;
}

/* Scrollbar for test list */
.test-list::-webkit-scrollbar {
    width: 6px;
}

.test-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.test-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.test-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Remove focus from all dropdown buttons */
.save-selected-dropdown button:focus,
.my-test-dropdown button:focus,
.test-list-item:focus,
.manage-tests-btn:focus,
.save-test-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .save-selected-dropdown,
    .my-test-dropdown {
        width: 100%;
    }
    
    .save-selected-dropdown .dropdown-content,
    .my-test-dropdown .dropdown-content {
        left: 0;
        right: 0;
        min-width: auto;
    }
    
    .qb-save-btn,
    .qb-mytest-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Ensure proper spacing in export buttons */
.qb-export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    align-items: center;
}


.qb-list-header h4 {
    text-align: center;
    margin: 0;
    padding: 10px 0;
    font-size: 20px;
}

.qb-list-header h4 span.qb-question-count {
    display: block;
    font-weight: normal;
    font-size: 0.6em;
    margin-top: 5px;
}




/* =======================Footer====================== */
.qb-footer {
    background: #fff;
    margin-top: 20px;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    display: block;
}

.qb-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Force full width up to 1400px */
.qb-footer,
.qb-footer-container {
    min-width: 100%;
}

/* When screen width exceeds 1400px, set to 90% */
@media (min-width: 1401px) {
    .qb-footer-container {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }
}

.qb-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.qb-footer-copyright p,
.qb-footer-credits p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.qb-footer-credits p {
    color: #888;
}

/* ======================= Footer Mobile Responsive ====================== */

/* Mobile Large */
@media (max-width: 768px) {
    .qb-footer {
        margin-top: 40px;
        padding: 15px 0;
    }
    
    .qb-footer-container {
        padding: 0 15px;
    }
    
    .qb-footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .qb-footer {
        margin-top: 30px;
    }
    
    .qb-footer-container {
        padding: 0 12px;
    }
    
    .qb-footer-copyright p,
    .qb-footer-credits p {
        font-size: 13px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .qb-footer-container {
        padding: 0 10px;
    }
}



/* User Mode Indicator Styles */

.qb-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.qb-mode-visitor {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.qb-mode-user {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.qb-mode-admin {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.qb-mode-icon {
    font-size: 16px;
}

/* Disabled state styles */
.qb-filter:disabled,
#qb-search-input:disabled,
#qb-sort-by:disabled,
#qb-select-all:disabled,
#qb-reset-filters:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

/* Message styles */
.qb-message {
    padding: 0px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.qb-message-info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.qb-message-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.qb-message-warning {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.qb-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Load More Button */
.qb-load-more-container {
    padding: 5px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.qb-load-more-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.qb-load-more-btn:hover {
    background: #2980b9;
}

.qb-load-more-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}





/* Temporary debug styles */
.qb-debug-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 12px;
    color: #6c757d;
}

.qb-question-count::after {
    content: " - (Total: " attr(data-total) ")";
    color: #6c757d;
    font-size: 0.9em;
}

/* Additional debug styles for better visibility */
.qb-debug-info strong {
    color: #495057;
}

.qb-debug-info .debug-item {
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px dashed #dee2e6;
}

.qb-debug-info .debug-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}





/* ====================AI Solution========================== */


/* AI Solution Styles */
.qb-ai-solution-container {
    padding: 20px;
}

.qb-ai-loading {
    text-align: center;
    padding: 40px 20px;
}

.qb-ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qb-ai-loading-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.qb-ai-loading-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.qb-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.qb-ai-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.qb-ai-actions .qb-refresh-ai {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.qb-ai-actions .qb-refresh-ai:hover {
    background: #2980b9;
}

.qb-ai-content {
    line-height: 1.6;
    font-size: 15px;
}

.qb-ai-content h1,
.qb-ai-content h2,
.qb-ai-content h3,
.qb-ai-content h4 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

.qb-ai-content h1 { font-size: 24px; }
.qb-ai-content h2 { font-size: 20px; }
.qb-ai-content h3 { font-size: 18px; }

.qb-ai-content p {
    margin-bottom: 15px;
}

.qb-ai-content strong {
    color: #e74c3c;
}

.qb-ai-content em {
    color: #27ae60;
}

.qb-ai-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.qb-ai-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    font-size: 14px;
    color: #856404;
}

.qb-ai-cache-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #155724;
}

.qb-ai-error {
    text-align: center;
    padding: 40px 20px;
}

.qb-ai-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.qb-ai-error h3 {
    color: #dc3545;
    margin-bottom: 15px;
}

.qb-ai-error p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

.qb-ai-error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.qb-ai-error-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.qb-retry-ai {
    background: #3498db;
    color: white;
}

.qb-contact-support {
    background: #6c757d;
    color: white;
}

.qb-ai-multi-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.qb-ai-multi-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.qb-ai-multi-placeholder h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.qb-ai-multi-placeholder p {
    color: #666;
    margin-bottom: 10px;
    font-size: 16px;
}

.qb-ai-multi-tip {
    background: #e8f4fd;
    border: 1px solid #b6e0fe;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #2c3e50;
}



.qb-ai-disabled {
    text-align: center;
    padding: 100px 40px;
}

div.qb-ai-disabled h3{
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 28px;
}
div.qb-ai-disabled  {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.qb-ai-disabled-icon{
    font-size: 64px;
    text-align: center;
}


/* Previous/Next Navigation Styles */
.qb-nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#qtnPrevious, #qtnNext {
    background: #e1ecff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

#qtnPrevious:hover, #qtnNext:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

#qtnPrevious:disabled, #qtnNext:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

#qtnPrevious:disabled:hover, #qtnNext:disabled:hover {
    background: #bdc3c7;
    transform: none;
}

/* Keyboard shortcut hint */
.qb-navigation-hint {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 5px;
}





/* ========================================= */

/* Custom Checkbox Dropdown Styles */
.qb-custom-dropdown {
    position: relative;
    width: 100%;
}

.qb-dropdown-trigger {
    padding: 2px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.qb-dropdown-trigger:hover {
    border-color: #3498db;
}

.qb-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qb-dropdown-options.show {
    display: block;
    padding: 12px 0px;
}

.qb-option-item {
    display: flex;
    align-items: center;
    padding: 0px 12px;
    cursor: pointer;
}

.qb-option-item:hover {
    background: #f8f9fa;
}

.qb-option-item:last-child {
    border-bottom: none;
}

.qb-option-item input[type="checkbox"] {
    display: none;
}

.qb-checkbox {
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qb-checkbox:after {
    content: '✓';
    color: white;
    font-size: 12px;
    display: none;
}

.qb-option-item input[type="checkbox"]:checked + .qb-checkbox {
    background: #3498db;
    border-color: #3498db;
}

.qb-option-item input[type="checkbox"]:checked + .qb-checkbox:after {
    display: block;
}

.qb-option-text {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
}

.qb-no-options {
    padding: 12px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Selected Tags Styles */
.qb-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    min-height: 24px;
}

.qb-selected-tag {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qb-selected-tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.qb-selected-tag-remove:hover {
    color: #ffdddd;
}

/* Filter Actions */
.qb-filter-actions {
    gap: 16px;
    align-items: flex-end;
    display: flex;
    /* justify-content: center; */
}

.qb-apply-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.qb-apply-btn:hover {
    background: #2b804d;
}

.qb-reset-btn {
    background: #ff7929;
    color: white;
    border: none;
    padding: 7px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.qb-reset-btn:hover {
    background: #a2623b;
}

/* Dropdown trigger with selected items */
.qb-dropdown-trigger.has-selection .qb-dropdown-placeholder {
    color: #228cf7;
    font-weight: 500;
    font-size: 15px;
}



/* Test list container styles */
.test-list-container {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 5px;
    background: white;
}

.test-list-item:hover {
    background: #e1ecff;
}

.test-item-actions {
    display: flex;
    gap: 5px;
}

.test-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 12px;
    opacity: 0.7;
}

.test-delete-btn:hover {
    opacity: 1;
}

.qb-no-tests {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}




/* Export Hover Menu Styles - Top Position */
.export-pdf-hover,
.export-word-hover {
    position: relative;
    display: inline-block;
}

.export-pdf-hover .qb-export-btn,
.export-word-hover .qb-export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.export-pdf-hover .qb-export-btn:hover,
.export-word-hover .qb-export-btn:hover {
    background: #2980b9;
}

.export-pdf-hover .hover-menu,
.export-word-hover .hover-menu {
    display: none;
    position: absolute;
    bottom: 100%; /* Changed from top: 100% to bottom: 100% */
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 5px;
    z-index: 1000;
    margin-bottom: 5px; /* Changed from margin-top to margin-bottom */
    border: 1px solid #ddd;
    animation: fadeIn 0.2s ease;
}

.export-pdf-hover:hover .hover-menu,
.export-word-hover:hover .hover-menu {
    display: block;
}

.export-pdf-hover .hover-menu .menu-item,
.export-word-hover .hover-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s ease;
    font-size: 14px;
    cursor: pointer;
}

.export-pdf-hover .hover-menu .menu-item:first-child,
.export-word-hover .hover-menu .menu-item:first-child {
    border-radius: 5px 5px 0 0;
}

.export-pdf-hover .hover-menu .menu-item:last-child,
.export-word-hover .hover-menu .menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 5px 5px;
}

.export-pdf-hover .hover-menu .menu-item:hover,
.export-word-hover .hover-menu .menu-item:hover {
    background: #3498db;
    color: white;
}

.export-pdf-hover .hover-menu .menu-icon,
.export-word-hover .hover-menu .menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Disabled state for restricted users */
.export-pdf-hover .qb-restricted-btn,
.export-word-hover .qb-restricted-btn {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.export-pdf-hover .qb-restricted-btn:hover,
.export-word-hover .qb-restricted-btn:hover {
    background: #7f8c8d !important;
}

/* Animation for smooth appearance - Updated for top position */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px); /* Changed from -10px to 10px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure proper spacing in the export options container */
.qb-export-options {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}




/* Pagination Styles - FIXED FOR OVERFLOW */
.qb-pagination-container {
    padding: 6px 0;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    box-sizing: border-box;
}

.qb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    margin-right: 10px;
}

.qb-pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 3px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.qb-pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #007cba;
}

.qb-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qb-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 1; /* Allow numbers to shrink slightly if needed */
    min-width: 0; /* Allow flex shrinking */
    overflow: hidden; /* Prevent overflow */
}

.qb-pagination-number {
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent page numbers from shrinking */
}

.qb-pagination-number:hover {
    background: #f5f5f5;
    border-color: #007cba;
}

.qb-pagination-active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.qb-pagination-ellipsis {
    padding: 6px 4px;
    color: #666;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0; /* Prevent ellipsis from shrinking */
}

.qb-pagination-icon {
    font-size: 11px;
}

/* Ensure the entire pagination is responsive */
.qb-pagination-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

/* Alternative compact layout for many pages */
@media (max-width: 1024px) {
    .qb-pagination {
        gap: 2px;
    }
    
    .qb-pagination-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .qb-pagination-number {
        padding: 5px 8px;
        min-width: 32px;
        font-size: 12px;
    }
    
    .qb-pagination-ellipsis {
        padding: 5px 3px;
        font-size: 12px;
        min-width: 18px;
    }
}

@media (max-width: 768px) {
    .qb-pagination-btn .qb-pagination-text {
        display: none; /* Hide text on mobile, show only icons */
    }
    
    .qb-pagination-btn {
        padding: 5px 8px;
    }
    
    .qb-pagination-btn .qb-pagination-icon {
        margin: 0;
    }
    
    .qb-pagination-number {
        padding: 5px 6px;
        min-width: 28px;
        font-size: 11px;
    }
}

/* Extreme mobile layout */
@media (max-width: 480px) {
    .qb-pagination {
        gap: 1px;
    }
    
    .qb-pagination-btn {
        padding: 4px 6px;
    }
    
    .qb-pagination-number {
        padding: 4px 5px;
        min-width: 26px;
        font-size: 10px;
    }
    
    .qb-pagination-ellipsis {
        padding: 4px 2px;
        min-width: 16px;
        font-size: 10px;
    }
}