/* =====================================================
   HWQ FRONTEND STYLES
   ===================================================== */

/* Layout & Container */
.hwq-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hwq-quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.hwq-quiz-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #098641;
    font-family: 'Poppins';
}

.hwq-quiz-description {
    font-size: 14px;
    color: #020c32;
    line-height: 1.6;
    margin: 10px 0;
    font-family: 'Poppins';
}

.hwq-quiz-meta {
    font-size: 14px;
    color: #020c32;
    margin: 15px 0 0 0;
    font-family: 'Poppins';
}

/* Questions */
.hwq-quiz-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hwq-question {
    padding: 20px;
    background: #098641;
    border-radius: 8px;
    border-left: 4px solid #ed1d26;
}

.hwq-question-number {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Poppins';
}

.hwq-question h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 20px 0;
    color: #ffffff;
    line-height: 1.5;
    font-family: 'Poppins';
}

/* Options */
.hwq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: none;
}

.hwq-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hwq-option:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.hwq-option input[type="radio"] {
    margin: 4px 12px 0 0;
    cursor: pointer;
    accent-color: #3182ce;
}

.hwq-option input[type="radio"]:checked + .hwq-option-text {
    color: #2c5282;
    font-weight: 500;
}

.hwq-option input[type="radio"]:checked {
    border-color: #3182ce;
}

.hwq-option-text {
    flex: 1;
    font-size: 13px;
    color: #2d3748;
    line-height: 1.5;
    font-family: 'Poppins';
}

/* Submit Button */
.hwq-submit-btn {
    align-self: center;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: #098641;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.hwq-submit-btn:hover {
    background: #2c5282;
}

.hwq-submit-btn:active {
    transform: scale(0.98);
}

/* Results */
.hwq-results-container {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hwq-results-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.hwq-results-score {
    margin-bottom: 30px;
}

.hwq-score-number {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hwq-score-band {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hwq-results-details {
    text-align: left;
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.hwq-results-details h3 {
    font-size: 20px;
    margin: 0 0 15px 0;
    color: #1a202c;
}

.hwq-results-details ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.hwq-results-details li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #2d3748;
    font-size: 15px;
    line-height: 1.6;
}

.hwq-results-details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.hwq-results-tip {
    background: #edf2f7;
    padding: 15px;
    border-left: 4px solid #3182ce;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
    color: #2d3748;
}

.hwq-results-tip strong {
    display: block;
    margin-bottom: 5px;
    color: #1a202c;
}

.hwq-results-note {
    background: #fef5e7;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 13px;
    color: #7c2d12;
    border-left: 4px solid #f59e0b;
}

.hwq-take-again-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
}

.hwq-take-again-btn:hover {
    background: #2c5282;
}

/* =====================================================
   ANALYTICS DASHBOARD
   ===================================================== */

.hwq-analytics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hwq-analytics-header {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Poppins';
    font-weight: 600;
}

.hwq-analytics-header h2 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: #028a41;
    font-weight: 600;
    font-family: 'Poppins';
}

.hwq-analytics-header p {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
    font-family: 'Poppins';
}

/* Controls */
.hwq-analytics-controls {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hwq-filter-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Stats Grid */
.hwq-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.hwq-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hwq-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hwq-stat-number {
    font-size: 30px;
    font-weight: 700;
    color: #ed1d26;
    margin-bottom: 10px;
}

.hwq-stat-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #028a41;
    font-weight: 600;
    font-family: 'Poppins';
}

/* Charts */
.hwq-charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.hwq-chart-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hwq-chart-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1a202c;
    font-family: 'Poppins';
    font-weight: 600;
}

.hwq-chart-container canvas {
    max-height: 300px;
}

/* Questions Analysis */
.hwq-questions-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.hwq-questions-section h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    color: #1a202c;
}

.hwq-question-analysis {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.hwq-question-analysis:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hwq-question-analysis h4 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
    font-family: 'Poppins';
}

.hwq-option-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hwq-option-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hwq-bar-label {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
    font-family: 'Poppins';
}

.hwq-bar-container {
    display: flex;
    align-items: center;
    background: #edf2f7;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
}

.hwq-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #098641, #ed1d26);
    transition: width 0.3s ease;
}

.hwq-bar-label-right {
    font-size: 12px;
    color: #4a5568;
    padding: 0 10px;
    margin-left: auto;
    font-weight: 500;
}

/* Note */
.hwq-analytics-note {
    background: #098641;
    border-left: 4px solid #ed1d26;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.hwq-analytics-note p {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
    font-family: 'Poppins';
}

/* Responsive */
@media (max-width: 768px) {
    .hwq-quiz-container,
    .hwq-results-container,
    .hwq-analytics-container {
        padding: 15px;
    }
    
    .hwq-quiz-header h2 {
        font-size: 22px;
    }
    
    .hwq-charts-section {
        grid-template-columns: 1fr;
    }
    
    .hwq-results-card {
        padding: 20px;
    }
    
    .hwq-results-details {
        padding: 20px;
    }
    
    .hwq-score-number {
        font-size: 48px;
    }
}


/*Month selector */
.hwq-quiz-month-select{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
    justify-content: center;
}
.hwq-quiz-month-select label{
    font-weight:600;
}
.hwq-month-picker{
    padding:10px 12px;
    border:1px solid #d1d5db;
    border-radius:12px;
    font-family: inherit;
}


/* Heineken Modal Notice (smdoda-styling) */
.hwq-modal { display:none; position:fixed; inset:0; z-index:99999; font-family:Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.hwq-modal.is-open { display:block; }
.hwq-modal__backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.55); }
.hwq-modal__dialog { position:relative; width:min(560px, calc(100% - 32px)); margin:10vh auto 0; background:#fff; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,0.25); overflow:hidden; border: 1px solid #e5e7eb; }
.hwq-modal__header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #eef2f6; }
.hwq-modal__title { margin:0; font-size:16px; font-weight:700; color:#0b2d1a; }
.hwq-modal__close { border:0; background:transparent; font-size:22px; line-height:1; cursor:pointer; color:#6b7280; }
.hwq-modal__body { padding:14px 16px; color:#111827; font-size:14px; }
.hwq-modal__footer { padding:14px 16px; border-top:1px solid #eef2f6; display:flex; justify-content:flex-end; gap:10px; }

html.hwq-modal-open, html.hwq-modal-open body { overflow:hidden; }

.hwq-btn { border-radius:10px; padding:10px 14px; font-weight:700; border:1px solid transparent; cursor:pointer; }
.hwq-btn--primary { background:#028A41; color:#fff; }
.hwq-btn--primary:hover { filter: brightness(0.95); }

.hwq-modal--danger .hwq-modal__header { border-bottom-color: rgba(237,29,38,0.25); }
.hwq-modal--danger .hwq-modal__title { color:#ed1d26; }
.hwq-modal--info .hwq-modal__title { color:#028A41; }

/* =====================================================
   smdoda-styling: Multi-company brand overrides
   ===================================================== */
.hwq-quiz-container,
.hwq-analytics-container {
    --hwq-primary: #028A41;
    --hwq-secondary: #ed1d26;
}

.hwq-company-brand {
    display: flex;
    justify-content: center;
    margin: 0 0 18px;
}

.hwq-company-brand img {
    max-height: 72px;
    max-width: 220px;
    object-fit: contain;
}

.hwq-quiz-header,
.hwq-analytics-header {
    border-top-color: var(--hwq-primary);
}

.hwq-quiz-header h2,
.hwq-analytics-header h2,
.hwq-question-number,
.hwq-stat-number {
    color: var(--hwq-primary) !important;
}

.hwq-submit-btn,
.hwq-btn--primary,
.hwq-take-again-btn {
    background: var(--hwq-primary) !important;
    border-color: var(--hwq-primary) !important;
}

.hwq-submit-btn:hover,
.hwq-btn--primary:hover,
.hwq-take-again-btn:hover {
    background: var(--hwq-secondary) !important;
    border-color: var(--hwq-secondary) !important;
}

.hwq-option input[type="radio"]:checked + .hwq-option-text,
.hwq-bar-fill {
    background-color: var(--hwq-primary) !important;
}

.hwq-option:has(input[type="radio"]:checked) {
    border-color: var(--hwq-primary) !important;
}
