/* ===================================================
   EQ Test Plugin - Frontend Styles
   Colors: Royal Purple (#7E22CE) + Rose (#EC4899)
   RTL Support
   =================================================== */

/* Reset & Base */
/* Font strategy: Use locally available Persian fonts first, then CDN fallback */
.eq-container {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Iranian Sans', 'B Nazanin', sans-serif;
    direction: rtl;
    text-align: right;
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    line-height: 1.8;
    color: #333;
}

.eq-container * {
    box-sizing: border-box;
}

/* ============ Intro Box ============ */
.eq-intro-box {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(126, 34, 206, 0.12);
    border: 1px solid #e8ecf2;
}

.eq-intro-header {
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    padding: 35px 30px 25px;
    text-align: center;
    position: relative;
}

.eq-intro-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #8B5CF6;
}

.eq-intro-icon {
    margin-bottom: 12px;
}

.eq-intro-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.eq-intro-content {
    padding: 40px 30px 25px;
}

.eq-intro-desc {
    color: #555;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 25px;
    text-align: justify;
}

.eq-intro-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 25px;
}

.eq-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f4f6fb;
    border-radius: 10px;
    border-right: 3px solid #EC4899;
    transition: transform 0.2s;
}

.eq-info-item:hover {
    transform: translateX(-3px);
}

.eq-info-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.eq-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eq-info-text strong {
    color: #7E22CE;
    font-size: 13px;
}

.eq-info-text span {
    color: #666;
    font-size: 13px;
}

.eq-intro-price {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #D8B4FE;
}

.eq-intro-price.eq-free {
    background: linear-gradient(135deg, #FDF2F8 0%, #FAF5FF 100%);
    border-color: #F9A8D4;
}

.eq-price-label {
    color: #555;
    font-size: 14px;
    margin-left: 8px;
}

.eq-price-value {
    color: #EC4899;
    font-size: 20px;
    font-weight: 700;
}

.eq-free .eq-price-value {
    color: #7E22CE;
}

.eq-intro-note {
    padding: 16px;
    background: #f8f9fc;
    border-radius: 10px;
    border: 1px solid #e4e8f0;
}

.eq-intro-note p {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.9;
}

.eq-intro-actions {
    display: flex;
    gap: 14px;
    padding: 20px 30px 30px;
    justify-content: center;
}

/* ============ Buttons ============ */
.eq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 32px;
    border-radius: 10px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
    line-height: 1.5;
}

.eq-btn-primary {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.eq-btn-primary:hover {
    background: linear-gradient(135deg, #DB2777 0%, #BE185D 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
    color: #ffffff;
}

.eq-btn-secondary {
    background: #ffffff;
    color: #7E22CE;
    border: 2px solid #7E22CE;
}

.eq-btn-secondary:hover {
    background: #7E22CE;
    color: #ffffff;
    transform: translateY(-2px);
}

.eq-btn-save {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: #ffffff;
    padding: 12px 30px;
    font-size: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.eq-btn-save:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.eq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============ Test Box ============ */
.eq-test-box {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(126, 34, 206, 0.12);
    border: 1px solid #e8ecf2;
}

.eq-test-header {
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    padding: 20px 25px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.eq-test-header h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 0 0 14px;
    text-align: center;
}

.eq-progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.eq-progress-bar {
    background: linear-gradient(90deg, #EC4899, #F472B6);
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.eq-progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-align: center;
}

/* Questions */
.eq-questions-wrapper {
    padding: 25px;
    min-height: 300px;
}

.eq-question-item {
    animation: eqFadeIn 0.3s ease;
}

@keyframes eqFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.eq-question-number {
    color: #EC4899;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.eq-question-text {
    color: #7E22CE;
    font-size: 16px;
    font-weight: 600;
    line-height: 2;
    margin-bottom: 20px;
}

.eq-question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eq-option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #f8f9fc;
    border: 2px solid #e4e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.eq-option-label:hover {
    border-color: #EC4899;
    background: #FAF5FF;
}

.eq-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.eq-option-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
}

.eq-radio-input:checked ~ .eq-option-indicator {
    border-color: #EC4899;
    background: #EC4899;
}

.eq-radio-input:checked ~ .eq-option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.eq-option-label:has(.eq-radio-input:checked) {
    border-color: #EC4899;
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.15);
}

.eq-option-text {
    color: #444;
    font-size: 14px;
    line-height: 1.8;
}

.eq-radio-input:checked ~ .eq-option-text {
    color: #7E22CE;
    font-weight: 600;
}

/* Test Navigation */
.eq-test-nav {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    background: #f8f9fc;
    border-top: 1px solid #e4e8f0;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

/* Converted Submit Button - the key transformation */
.eq-btn-converted-submit {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%) !important;
    color: #ffffff !important;
    padding: 20px 50px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5) !important;
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: inline-flex !important;
    justify-content: center;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    letter-spacing: -0.3px;
}

.eq-btn-converted-submit:hover {
    background: linear-gradient(135deg, #DB2777 0%, #BE185D 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.65) !important;
    color: #ffffff !important;
}

/* When nav contains submit - CSS :has() selector (modern browsers) */
.eq-test-nav:has(.eq-btn-converted-submit) {
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%);
    border-top: 3px solid #EC4899;
    justify-content: center;
    padding: 28px 20px;
}

/* JS-based fallback class for nav submit mode */
.eq-nav-submit-mode {
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%) !important;
    border-top: 3px solid #EC4899 !important;
    justify-content: center !important;
    padding: 28px 20px !important;
}

/* Pulse animation for submit button */
.eq-pulse {
    animation: eqPulse 1.5s ease-in-out infinite;
}

@keyframes eqPulse {
    0% { box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5); }
    50% { box-shadow: 0 8px 45px rgba(236, 72, 153, 0.9); transform: scale(1.03); }
    100% { box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5); }
}

/* ============ Completion Box ============ */
.eq-completion-box {
    text-align: center;
    padding: 50px 20px 30px;
    animation: eqCompletionIn 0.6s ease;
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%);
    border-radius: 16px;
    margin: 10px;
    border: 2px solid #F9A8D4;
}

@keyframes eqCompletionIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.eq-completion-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    color: #ffffff;
    font-size: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 6px 20px rgba(126, 34, 206, 0.35);
}

.eq-completion-box h3 {
    color: #7E22CE;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 14px;
}

.eq-completion-box p {
    color: #555;
    font-size: 15px;
    line-height: 2;
    margin: 0;
}

/* ============ Popup ============ */
.eq-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: eqOverlayIn 0.3s ease;
}

@keyframes eqOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eq-popup-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: eqPopupIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: auto;
    margin-bottom: auto;
}

@keyframes eqPopupIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.eq-popup-header {
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.eq-popup-header h3 {
    color: #ffffff;
    font-size: 16px;
    margin: 0;
}

.eq-popup-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.eq-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.eq-popup-content {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.eq-popup-note {
    color: #555;
    font-size: 13px;
    line-height: 2;
    margin-bottom: 18px;
    padding: 14px;
    background: #f4f6fb;
    border-radius: 10px;
    border-right: 3px solid #EC4899;
}

.eq-popup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.eq-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eq-form-group label {
    color: #7E22CE;
    font-size: 13px;
    font-weight: 600;
}

.eq-form-group input[type="text"],
.eq-form-group input[type="number"],
.eq-form-group input[type="tel"] {
    padding: 10px 14px;
    border: 2px solid #e4e8f0;
    border-radius: 10px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 14px;
    transition: border-color 0.25s;
    direction: rtl;
}

.eq-form-group input:focus {
    outline: none;
    border-color: #EC4899;
}

.eq-gender-group {
    display: flex;
    gap: 20px;
}

.eq-gender-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #444;
    font-size: 14px;
}

.eq-gender-label input[type="radio"] {
    accent-color: #EC4899;
}

.eq-popup-warning {
    padding: 12px 14px;
    background: #FDF2F8;
    border: 1px solid #D8B4FE;
    border-radius: 10px;
    color: #7E22CE;
    font-size: 12px;
    line-height: 1.9;
}

.eq-popup-actions {
    display: flex;
    gap: 12px;
    padding: 16px 22px;
    background: #f8f9fc;
    border-top: 1px solid #e4e8f0;
    justify-content: center;
    flex-shrink: 0;
}

/* ============ Auth Check ============ */
.eq-auth-box {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(126, 34, 206, 0.12);
    border: 1px solid #e8ecf2;
    max-width: 500px;
    margin: 0 auto;
}

.eq-auth-header {
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    padding: 30px 25px;
    text-align: center;
}

.eq-auth-icon {
    margin-bottom: 12px;
}

.eq-auth-header h3 {
    color: #ffffff;
    font-size: 20px;
    margin: 0 0 10px;
}

.eq-auth-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0;
    line-height: 1.8;
}

.eq-auth-form {
    padding: 25px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.eq-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e4e8f0;
    border-radius: 10px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 15px;
    transition: border-color 0.25s;
    text-align: center;
    letter-spacing: 3px;
}

.eq-input:focus {
    outline: none;
    border-color: #EC4899;
}

.eq-auth-result {
    padding: 0 25px 25px;
}

.eq-auth-success {
    padding: 20px;
    background: #FDF2F8;
    border: 1px solid #F9A8D4;
    border-radius: 12px;
}

.eq-auth-success h4 {
    color: #7E22CE;
    margin: 0 0 14px;
    font-size: 16px;
}

.eq-auth-success .eq-auth-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ede9fe;
    font-size: 14px;
}

.eq-auth-success .eq-auth-detail:last-child {
    border-bottom: none;
}

.eq-auth-detail-label {
    color: #555;
    font-weight: 600;
}

.eq-auth-detail-value {
    color: #7E22CE;
}

.eq-auth-error {
    padding: 16px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 12px;
    color: #c62828;
    font-size: 14px;
    text-align: center;
}

/* ============ Success / Error Boxes ============ */
.eq-success-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(126, 34, 206, 0.12);
}

.eq-success-box h3 {
    color: #7E22CE;
    font-size: 20px;
    margin: 0 0 12px;
}

.eq-success-box p {
    color: #555;
    margin-bottom: 20px;
}

.eq-error-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(126, 34, 206, 0.12);
    color: #c62828;
}

.eq-error-box h3 {
    color: #c62828;
    margin: 0 0 12px;
}

/* ============ Report Styles ============ */
.eq-report-wrapper {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    color: #333;
}

.eq-report-actions {
    text-align: center;
    margin: 20px 0;
}

.eq-report-content {
    background: #ffffff;
    max-width: 210mm;
    margin: 0 auto 20px;
    padding: 12mm 14mm;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    box-sizing: border-box;
}

/* Print-only: Compact header (hidden on screen) */
.eq-print-header {
    display: none;
}

.eq-print-header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    flex-wrap: wrap;
}

.eq-print-header-divider {
    color: #ddd;
    margin: 0 2px;
}

.eq-print-header-item {
    color: #444;
}

/* Print-only: Footer with QR (hidden on screen) */
.eq-print-footer {
    display: none;
}

/* Print-only: Watermark (hidden on screen) */
.eq-watermark {
    display: none;
}

/* Report Header - Title centered, logo below title */
.eq-report-header {
    padding-bottom: 14px;
    border-bottom: 2px solid #7E22CE;
    margin-bottom: 14px;
}

.eq-report-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.eq-report-logo {
    flex-shrink: 0;
    margin-top: 4px;
}

.eq-report-logo img {
    max-height: 45px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.eq-report-title-area {
    text-align: center;
}

.eq-report-main-title {
    color: #7E22CE;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
}

.eq-report-subtitle {
    color: #EC4899;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}

/* Personal Info Bar */
.eq-report-personal-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 10px 14px;
    background: #f4f6fb;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
}

.eq-personal-item {
    display: flex;
    gap: 4px;
}

.eq-personal-label {
    color: #888;
    font-weight: 600;
}

.eq-personal-value {
    color: #7E22CE;
    font-weight: 500;
}

.eq-unique-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: #EC4899 !important;
}

/* Type Badge */
.eq-type-badge-section {
    text-align: center;
    padding: 18px 0;
    margin-bottom: 14px;
}

.eq-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7E22CE 0%, #8B5CF6 100%);
    padding: 18px 45px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(126, 34, 206, 0.25);
}

.eq-type-letters {
    color: #EC4899;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 6px;
    direction: ltr;
}

.eq-type-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

/* Section Title */
.eq-section-title {
    color: #7E22CE;
    font-size: 17px;
    font-weight: 700;
    margin: 18px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #EC4899;
    display: inline-block;
}

/* Dimension Bars */
.eq-dimensions-section {
    margin-bottom: 14px;
}

.eq-dimension-bar {
    margin-bottom: 12px;
}

.eq-dim-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
}

.eq-dim-left {
    color: #7E22CE;
}

.eq-dim-right {
    color: #EC4899;
}

.eq-dim-track {
    background: #e4e8f0;
    border-radius: 8px;
    height: 18px;
    overflow: hidden;
    direction: ltr;
}

.eq-dim-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.eq-dim-self_awareness { background: linear-gradient(90deg, #7E22CE, #A78BFA); }
.eq-dim-self_regulation { background: linear-gradient(90deg, #2563EB, #60A5FA); }
.eq-dim-motivation { background: linear-gradient(90deg, #D97706, #FBBF24); }
.eq-dim-empathy { background: linear-gradient(90deg, #EC4899, #F472B6); }
.eq-dim-social_skills { background: linear-gradient(90deg, #0D9488, #5EEAD4); }

.eq-dim-percentages {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* Description */
.eq-description-text {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    text-align: justify;
    margin-bottom: 10px;
}

/* Strengths & Weaknesses */
.eq-sw-section {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}

.eq-sw-col {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
}

.eq-strengths {
    background: #FDF2F8;
    border: 1px solid #F9A8D4;
}

.eq-weaknesses {
    background: #FDF2F8;
    border: 1px solid #D8B4FE;
}

.eq-sw-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
    padding-bottom: 6px;
}

.eq-strengths-title {
    color: #7E22CE;
    border-bottom: 2px solid #7E22CE;
}

.eq-weaknesses-title {
    color: #e65100;
    border-bottom: 2px solid #e65100;
}

.eq-sw-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eq-sw-list li {
    font-size: 14px;
    line-height: 1.65;
    padding: 4px 18px 4px 0;
    position: relative;
    color: #444;
}

.eq-sw-list li::before {
    content: '';
    position: absolute;
    right: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.eq-strengths .eq-sw-list li::before {
    background: #7E22CE;
}

.eq-weaknesses .eq-sw-list li::before {
    background: #e65100;
}

/* Growth Tips */
.eq-growth-section {
    margin-bottom: 10px;
}

.eq-growth-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eq-growth-list li {
    font-size: 14px;
    line-height: 1.65;
    padding: 6px 18px 6px 0;
    position: relative;
    color: #444;
    border-bottom: 1px dashed #e4e8f0;
}

.eq-growth-list li:last-child {
    border-bottom: none;
}

.eq-growth-list li::before {
    content: '\2714';
    position: absolute;
    right: 2px;
    top: 9px;
    font-size: 11px;
    color: #EC4899;
}

/* Career */
.eq-career-intro {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 10px;
    text-align: justify;
}

.eq-career-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.eq-career-category {
    padding: 10px;
    background: #f4f6fb;
    border-radius: 8px;
    border-right: 3px solid #EC4899;
}

.eq-career-cat-title {
    color: #7E22CE;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 5px;
}

.eq-career-cat-jobs {
    color: #555;
    font-size: 12px;
    line-height: 2;
    margin: 0;
}

/* Relationships */
.eq-relations-text {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 10px;
    text-align: justify;
}

.eq-match-box {
    display: inline-flex;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF2F8 100%);
    border: 1px solid #D8B4FE;
    border-radius: 8px;
    font-size: 12px;
}

.eq-match-label {
    color: #888;
    font-weight: 600;
}

.eq-match-value {
    color: #EC4899;
    font-weight: 700;
    direction: ltr;
}

/* Type Table */
.eq-type-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 12px;
}

.eq-type-table th {
    background: #7E22CE;
    color: #ffffff;
    padding: 10px 8px;
    font-weight: 600;
    text-align: center;
}

.eq-type-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    color: #444;
}

.eq-type-table small {
    color: #888;
    font-size: 10px;
}

.eq-active-type {
    background: #FDF2F8 !important;
    font-weight: 700;
    color: #EC4899 !important;
    border: 2px solid #EC4899 !important;
}

/* Functions Table */
.eq-functions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 12px;
}

.eq-functions-table th {
    background: #7E22CE;
    color: #ffffff;
    padding: 8px 10px;
    font-weight: 600;
    text-align: center;
}

.eq-functions-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    color: #444;
}

.eq-func-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #EC4899;
}

/* QR Code - now in print footer only */
.eq-report-qr {
    display: none;
}

.eq-report-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Stress Response Section */
.eq-stress-section {
    margin-bottom: 12px;
}

/* Famous People Section */
.eq-famous-section {
    margin-bottom: 12px;
}

/* Learning Style Section */
.eq-learning-section {
    margin-bottom: 12px;
}

/* Report Footer - now in print footer only */
.eq-report-footer {
    display: none;
}

.eq-footer-auth-text {
    font-size: 8px;
    color: #888;
    text-align: center;
    line-height: 1.6;
}

.eq-footer-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #EC4899;
}

/* ============ Print Styles ============ */
/* Fallback for direct window.print() calls.
   The primary print method (eqSaveReport) opens a clean new window
   with self-contained CSS that doesn't depend on external stylesheets. */
@page {
    size: A4;
    margin: 15mm;
}

@media print {
    /* Hide non-report elements */
    .no-print,
    .eq-report-actions,
    .eq-container > *:not(.eq-report-wrapper) {
        display: none !important;
    }

    /* Remove site header/footer/navigation */
    body > *:not(.eq-report-wrapper) {
        display: none !important;
    }

    /* Reset body for print */
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    /* Content area - let it flow naturally within @page margins */
    .eq-report-content {
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 0 8mm 0 !important;
        position: relative;
        z-index: 2;
    }

    /* Print header - compact, fixed in top margin area */
    .eq-print-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 3mm 15mm;
        background: #ffffff;
        border-bottom: 1.5px solid #7E22CE;
        z-index: 100;
    }

    .eq-print-header-inner {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        font-size: 9px;
        flex-wrap: wrap;
    }

    .eq-print-header-divider {
        color: #ccc;
        margin: 0 1px;
    }

    .eq-print-header-item {
        color: #444;
    }

    /* Print footer - compact, fixed in bottom margin area */
    .eq-print-footer {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 2mm 15mm;
        background: #ffffff;
        z-index: 100;
        align-items: center;
        gap: 3mm;
        border-top: 1px solid #ddd;
    }

    .eq-print-footer-qr {
        width: 11mm;
        height: 11mm;
        flex-shrink: 0;
    }

    .eq-print-footer-qr img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .eq-print-footer-text {
        font-size: 7px;
        color: #888;
        text-align: center;
        line-height: 1.5;
        flex: 1;
    }

    /* Watermark - fixed, centered, behind content */
    .eq-watermark {
        display: block !important;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 0;
        opacity: 0.06;
        pointer-events: none;
    }

    .eq-watermark img {
        max-width: 180mm;
        max-height: 180mm;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Tables: prevent splitting across pages */
    .eq-type-table,
    .eq-functions-table,
    table {
        page-break-inside: avoid !important;
    }

    /* Key sections: try to keep together */
    .eq-type-badge-section,
    .eq-sw-section,
    .eq-report-header {
        page-break-inside: avoid;
    }

    /* Section titles: don't orphan at bottom of page */
    .eq-section-title {
        page-break-after: avoid;
    }

    /* Ensure colors and backgrounds print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .eq-container {
        margin: 15px auto;
        padding: 0 10px;
    }

    .eq-intro-header {
        padding: 25px 18px 18px;
    }

    .eq-intro-title {
        font-size: 18px;
    }

    .eq-intro-content {
        padding: 30px 18px 20px;
    }

    .eq-intro-desc {
        font-size: 14px;
    }

    .eq-intro-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .eq-intro-actions {
        flex-direction: column;
        padding: 15px 18px 22px;
    }

    .eq-intro-actions .eq-btn {
        width: 100%;
    }

    .eq-sw-section {
        flex-direction: column;
    }

    .eq-career-grid {
        grid-template-columns: 1fr;
    }

    .eq-report-personal-bar {
        font-size: 10px;
    }

    .eq-report-content {
        padding: 10mm 10mm;
        width: 100%;
        height: auto;
    }

    .eq-type-letters {
        font-size: 28px;
    }

    .eq-test-nav {
        flex-wrap: wrap;
    }

    /* Popup mobile fixes */
    .eq-popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .eq-popup-box {
        max-height: 90vh;
        border-radius: 14px 14px 8px 8px;
    }

    .eq-popup-header {
        padding: 14px 16px;
    }

    .eq-popup-header h3 {
        font-size: 14px;
    }

    .eq-popup-content {
        padding: 16px;
    }

    .eq-popup-note {
        font-size: 12px;
        padding: 10px;
        margin-bottom: 14px;
        line-height: 1.8;
    }

    .eq-popup-form {
        gap: 12px;
    }

    .eq-form-group input[type="text"],
    .eq-form-group input[type="number"],
    .eq-form-group input[type="tel"] {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .eq-popup-warning {
        font-size: 11px;
        padding: 10px 12px;
    }

    .eq-popup-actions {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }

    .eq-popup-actions .eq-btn {
        width: 100%;
        padding: 14px 20px;
    }

    /* Test box mobile */
    .eq-test-header {
        padding: 15px 16px;
    }

    .eq-test-header h3 {
        font-size: 15px;
    }

    .eq-questions-wrapper {
        padding: 16px;
    }

    .eq-question-text {
        font-size: 14px;
        line-height: 1.9;
    }

    .eq-option-label {
        padding: 12px 14px;
        gap: 10px;
    }

    .eq-option-text {
        font-size: 13px;
    }

    .eq-test-nav {
        padding: 14px 16px;
    }

    .eq-btn-converted-submit {
        padding: 16px 30px !important;
        font-size: 16px !important;
    }

    .eq-nav-submit-mode {
        padding: 20px 16px !important;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .eq-popup-overlay {
        padding: 5px;
    }

    .eq-popup-box {
        max-height: 95vh;
    }

    .eq-popup-content {
        padding: 12px;
    }

    .eq-popup-note {
        font-size: 11px;
        padding: 8px;
    }

    .eq-gender-group {
        gap: 14px;
    }
}
