/* WP Question Bank Builder Styles */

.wp-qb-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.wp-qb-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.wp-qb-layout {
    display: flex;
    gap: 30px;
}

.wp-qb-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.wp-qb-main {
    flex-grow: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    padding: 20px;
}

.wp-qb-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.wp-qb-card h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.wp-qb-form-group {
    margin-bottom: 15px;
}

.wp-qb-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.wp-qb-form-group input,
.wp-qb-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Tabs */
.wp-qb-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.wp-qb-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.wp-qb-tab.active {
    color: #007cba;
    border-bottom-color: #007cba;
}

/* Question Items */
.wp-qb-question-item {
    border: 1px solid #eaeaea;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
    background: #fff;
}

.wp-qb-question-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.wp-qb-question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}

.wp-qb-badge {
    background: #eef5fa;
    color: #007cba;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.wp-qb-question-content {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.wp-qb-question-options {
    margin-left: 20px;
    margin-bottom: 15px;
}

.wp-qb-question-option {
    margin-bottom: 5px;
}

.wp-qb-question-actions {
    display: flex;
    justify-content: flex-end;
}

/* Buttons */
.wp-qb-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.wp-qb-btn-primary {
    background: #007cba;
    color: #fff;
    width: 100%;
}
.wp-qb-btn-primary:hover { background: #006ba1; }

.wp-qb-btn-outline {
    background: transparent;
    border: 1px solid #007cba;
    color: #007cba;
}
.wp-qb-btn-outline:hover { background: #f0f8ff; }

.wp-qb-btn-success { background: #46b450; color: #fff; }
.wp-qb-btn-success:hover { background: #3b9c43; }

.wp-qb-btn-danger { background: #dc3232; color: #fff; }
.wp-qb-btn-danger:hover { background: #b32d2d; }

.wp-qb-cart-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* PDF Template Styles (only for PDF export) */
#wp-qb-pdf-template {
    background: #fff;
    color: #000;
}

.pdf-page {
    padding: 40px;
    font-family: "Times New Roman", Times, serif;
}

.pdf-header {
    text-align: center;
    margin-bottom: 20px;
}

.pdf-header h1 { margin: 0 0 5px; font-size: 20px; text-transform: uppercase; }
.pdf-header h2 { margin: 0 0 15px; font-size: 16px; font-weight: normal; }

.pdf-meta {
    display: flex;
    justify-content: space-between;
    text-align: left;
    font-size: 14px;
}

.pdf-meta p { margin: 5px 0; }
.pdf-body .pdf-question { margin-bottom: 20px; page-break-inside: avoid; }
.pdf-body .pdf-question-text { font-size: 14px; margin-bottom: 10px; }
.pdf-body .pdf-options { margin-left: 20px; font-size: 14px; }

/* Modal Styles */
.wp-qb-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wp-qb-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.wp-qb-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-qb-modal-header h2 { margin: 0; font-size: 18px; }

.wp-qb-modal-close {
    background: none; border: none; font-size: 24px; cursor: pointer; color: #666;
}

.wp-qb-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    background: #f5f5f5;
}

#wp-qb-preview-container {
    background: #fff;
    padding: 20mm;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 210mm;
}

.wp-qb-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
