/**
 * Home Style Quiz - Styles
 * Works with any WordPress theme
 */

/* ===================================
   VARIABLES (Set via PHP inline style)
=================================== */
.hsq-quiz-container {
    --hsq-primary: #e63946;
    --hsq-secondary: #1d3557;
    --hsq-accent: #f4a261;
    --hsq-success: #2a9d8f;
    --hsq-text: #1a1a2e;
    --hsq-text-light: #6c6c8a;
    --hsq-bg: #f8f9fa;
    --hsq-white: #ffffff;
    --hsq-border: #e0e0e0;
    --hsq-shadow: 0 4px 20px rgba(0,0,0,0.1);
    --hsq-radius: 16px;
    --hsq-transition: all 0.3s ease;
}

/* ===================================
   CONTAINER
=================================== */
.hsq-quiz-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--hsq-text);
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hsq-quiz-container * {
    box-sizing: border-box;
}

/* ===================================
   QUIZ CARD
=================================== */
.hsq-quiz-card {
    background: var(--hsq-white);
    border-radius: var(--hsq-radius);
    box-shadow: var(--hsq-shadow);
    overflow: hidden;
}

/* ===================================
   HEADER
=================================== */
.hsq-header {
    background: var(--hsq-secondary);
    color: var(--hsq-white);
    padding: 2rem;
    text-align: center;
}

.hsq-badge {
    display: inline-block;
    background: var(--hsq-accent);
    color: var(--hsq-text);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hsq-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 0.5rem 0 !important;
    color: var(--hsq-white) !important;
    line-height: 1.3 !important;
}

.hsq-subtitle {
    font-size: 1rem !important;
    opacity: 0.9;
    margin: 0 !important;
}

/* ===================================
   PROGRESS BAR
=================================== */
.hsq-progress {
    padding: 1.25rem 1.5rem 0;
    background: var(--hsq-white);
}

.hsq-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--hsq-text-light);
    margin-bottom: 0.5rem;
}

.hsq-progress-bar {
    height: 8px;
    background: var(--hsq-bg);
    border-radius: 10px;
    overflow: hidden;
}

.hsq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hsq-primary), var(--hsq-accent));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* ===================================
   QUIZ CONTENT
=================================== */
.hsq-content {
    padding: 1.5rem;
}

.hsq-slide {
    display: none;
    animation: hsqFadeIn 0.4s ease;
}

.hsq-slide.active {
    display: block;
}

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

/* Questions */
.hsq-question-num {
    font-size: 0.85rem;
    color: var(--hsq-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hsq-question {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hsq-text);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

/* Answers */
.hsq-answers {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hsq-answer {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--hsq-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--hsq-transition);
}

.hsq-answer:hover {
    border-color: var(--hsq-primary);
    background: var(--hsq-white);
    transform: translateX(4px);
}

.hsq-answer.selected {
    border-color: var(--hsq-primary);
    background: rgba(230, 57, 70, 0.08);
}

.hsq-letter {
    width: 32px;
    height: 32px;
    background: var(--hsq-white);
    border: 2px solid var(--hsq-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--hsq-text-light);
    flex-shrink: 0;
    transition: var(--hsq-transition);
}

.hsq-answer:hover .hsq-letter,
.hsq-answer.selected .hsq-letter {
    background: var(--hsq-primary);
    border-color: var(--hsq-primary);
    color: var(--hsq-white);
}

.hsq-answer-text {
    font-size: 0.95rem;
    color: var(--hsq-text);
}

/* ===================================
   EMAIL CAPTURE
=================================== */
.hsq-email-slide {
    text-align: center;
    padding: 1rem 0;
}

.hsq-email-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hsq-email-slide h3 {
    font-size: 1.35rem !important;
    margin: 0 0 0.5rem 0 !important;
    color: var(--hsq-text) !important;
}

.hsq-email-slide p {
    color: var(--hsq-text-light);
    margin-bottom: 1.25rem;
}

.hsq-email-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hsq-email-form input {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--hsq-border);
    border-radius: 10px;
    font-family: inherit;
    transition: var(--hsq-transition);
}

.hsq-email-form input:focus {
    outline: none;
    border-color: var(--hsq-primary);
}

.hsq-privacy {
    font-size: 0.8rem !important;
    color: var(--hsq-text-light) !important;
    margin-top: 1rem !important;
}

/* ===================================
   LOADING
=================================== */
.hsq-loading-slide {
    text-align: center;
    padding: 3rem 0;
}

.hsq-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--hsq-bg);
    border-top-color: var(--hsq-primary);
    border-radius: 50%;
    animation: hsqSpin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes hsqSpin {
    to { transform: rotate(360deg); }
}

.hsq-loading-slide p {
    color: var(--hsq-text-light);
}

/* ===================================
   RESULTS
=================================== */
.hsq-results-slide {
    text-align: center;
    padding: 0.5rem 0;
}

.hsq-result-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--hsq-primary), var(--hsq-accent));
    color: var(--hsq-white);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.hsq-result-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
}

.hsq-result-title {
    font-size: 1.5rem !important;
    color: var(--hsq-secondary) !important;
    margin: 0 0 0.75rem 0 !important;
}

.hsq-result-desc {
    color: var(--hsq-text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.hsq-result-traits {
    background: var(--hsq-bg);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: left;
    margin-bottom: 1.25rem;
}

.hsq-result-traits h4 {
    font-size: 0.9rem !important;
    margin: 0 0 0.75rem 0 !important;
    color: var(--hsq-text) !important;
}

.hsq-result-traits ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hsq-result-traits li {
    padding: 0.3rem 0 0.3rem 1.5rem !important;
    position: relative;
    font-size: 0.9rem;
    color: var(--hsq-text-light);
    margin: 0 !important;
}

.hsq-result-traits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--hsq-success);
    font-weight: bold;
}

.hsq-result-fix {
    background: linear-gradient(135deg, var(--hsq-secondary), #2d4a6f);
    color: var(--hsq-white);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: left;
}

.hsq-result-fix h4 {
    font-size: 0.95rem !important;
    margin: 0 0 0.5rem 0 !important;
    color: var(--hsq-accent) !important;
}

.hsq-result-fix p {
    margin: 0 !important;
    font-size: 0.95rem;
    opacity: 0.95;
}

/* ===================================
   BUTTONS
=================================== */
.hsq-btn {
    display: inline-block;
    padding: 0.9rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--hsq-transition);
}

.hsq-btn-primary {
    background: var(--hsq-primary) !important;
    color: var(--hsq-white) !important;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.hsq-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
    color: var(--hsq-white) !important;
}

.hsq-btn-large {
    display: block;
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   SALES SECTION
=================================== */
.hsq-sales-section {
    background: var(--hsq-bg);
    border-radius: var(--hsq-radius);
    padding: 2rem 1.5rem;
    margin-top: 1.5rem;
}

.hsq-sales-section.hsq-hidden {
    display: none;
}

.hsq-sales-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hsq-personalized-tag {
    display: inline-block;
    background: var(--hsq-success);
    color: var(--hsq-white);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hsq-sales-header h3 {
    font-size: 1.35rem !important;
    margin: 0 !important;
    color: var(--hsq-text) !important;
}

.hsq-product-box {
    background: var(--hsq-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.hsq-product-image {
    text-align: center;
    margin-bottom: 1.25rem;
}

.hsq-product-image img {
    max-width: 220px;
    border-radius: 10px;
    box-shadow: var(--hsq-shadow);
}

.hsq-product-name {
    font-size: 1.35rem !important;
    text-align: center;
    color: var(--hsq-secondary) !important;
    margin: 0 0 0.35rem 0 !important;
}

.hsq-product-subtitle {
    text-align: center;
    color: var(--hsq-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.hsq-benefits {
    list-style: none !important;
    margin: 0 0 1.25rem 0 !important;
    padding: 0 !important;
}

.hsq-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0 !important;
    border-bottom: 1px solid var(--hsq-border);
    font-size: 0.95rem;
    margin: 0 !important;
}

.hsq-benefits li:last-child {
    border-bottom: none;
}

.hsq-check {
    color: var(--hsq-success);
    font-weight: bold;
    flex-shrink: 0;
}

.hsq-price-box {
    text-align: center;
    padding: 1.25rem;
    background: #fefae0;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.hsq-original-price {
    font-size: 0.95rem;
    color: var(--hsq-text-light);
    text-decoration: line-through;
    display: block;
}

.hsq-sale-price {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--hsq-primary);
    display: block;
    line-height: 1.2;
}

.hsq-price-note {
    font-size: 0.85rem;
    color: var(--hsq-text-light);
}

.hsq-guarantee {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--hsq-white);
    border: 2px solid var(--hsq-success);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.25rem;
}

.hsq-guarantee-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.hsq-guarantee strong {
    display: block;
    color: var(--hsq-success);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.hsq-guarantee p {
    font-size: 0.85rem;
    color: var(--hsq-text-light);
    margin: 0 !important;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 600px) {
    .hsq-quiz-container {
        margin: 1rem auto;
    }
    
    .hsq-header {
        padding: 1.5rem;
    }
    
    .hsq-title {
        font-size: 1.25rem !important;
    }
    
    .hsq-question {
        font-size: 1.1rem;
    }
    
    .hsq-answer {
        padding: 0.75rem;
    }
    
    .hsq-letter {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .hsq-sales-section {
        padding: 1.5rem 1rem;
    }
    
    .hsq-guarantee {
        flex-direction: column;
        text-align: center;
    }
}
