/* =========================================================
   Greendale Coffee Personality Quiz – Frontend Styles
   ========================================================= */

/* CSS variables are injected inline by PHP (inject_css_vars) */
#cpq-quiz {
    --cpq-bg:       #fdf6ec;
    --cpq-primary:  #3b1f0f;
    --cpq-accent:   #c07535;
    --cpq-text:     #2c1810;
    --cpq-btn-bg:   #3b1f0f;
    --cpq-btn-text: #ffffff;
    --cpq-radio:    #c07535;
    --cpq-buy-bg:   #c07535;
    --cpq-buy-text: #ffffff;
    --cpq-font:     Georgia, serif;
}

/* ── Wrap ── */
.cpq-wrap {
    font-family: var(--cpq-font);
    color: var(--cpq-text);
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

/* ── Card ── */
.cpq-card {
    background: var(--cpq-bg);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 4px 32px rgba(59,31,15,0.10);
    text-align: center;
}

@media (max-width: 540px) {
    .cpq-card { padding: 28px 18px; }
}

/* ── Start screen ── */
.cpq-hero-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

.cpq-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--cpq-primary);
    margin: 0 0 10px;
}

.cpq-subtitle {
    font-size: 1rem;
    opacity: 0.75;
    margin: 0 0 28px;
    line-height: 1.6;
}

/* ── Buttons ── */
.cpq-btn {
    display: inline-block;
    padding: 13px 32px;
    background: var(--cpq-btn-bg);
    color: var(--cpq-btn-text);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--cpq-font);
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.cpq-btn:hover:not(:disabled) {
    opacity: 0.85;
    transform: translateY(-1px);
}

.cpq-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cpq-btn-outline {
    background: transparent;
    color: var(--cpq-primary);
    border: 2px solid var(--cpq-primary);
}

.cpq-btn-outline:hover:not(:disabled) {
    background: var(--cpq-primary);
    color: #fff;
    opacity: 1;
}

/* ── Progress ── */
.cpq-progress-wrap {
    margin-bottom: 24px;
}

.cpq-progress-bar {
    height: 6px;
    background: rgba(59,31,15,0.12);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cpq-progress-fill {
    height: 100%;
    background: var(--cpq-accent);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.cpq-progress-text {
    font-size: 0.82rem;
    opacity: 0.6;
    font-style: italic;
}

/* ── Question ── */
.cpq-question-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cpq-primary);
    margin: 0 0 20px;
    line-height: 1.4;
    text-align: left;
}

/* ── Answer list ── */
.cpq-answers-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    text-align: left;
}

.cpq-answer-item {
    margin-bottom: 10px;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
    background: rgba(255,255,255,0.7);
}

.cpq-answer-item:hover {
    border-color: var(--cpq-accent);
    background: rgba(192,117,53,0.07);
}

.cpq-answer-item.selected {
    border-color: var(--cpq-accent);
    background: rgba(192,117,53,0.12);
}

.cpq-answer-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

/* Hide native radio */
.cpq-answer-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Letter badge */
.cpq-answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--cpq-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.cpq-answer-item.selected .cpq-answer-letter,
.cpq-answer-item:hover .cpq-answer-letter {
    opacity: 1;
}

.cpq-answer-text {
    font-size: 0.97rem;
    line-height: 1.4;
}

/* ── Nav buttons ── */
.cpq-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

/* ── Result screen ── */
.cpq-result-card {
    text-align: center;
}

.cpq-result-emoji {
    font-size: 54px;
    display: block;
    margin-bottom: 8px;
    line-height: 1;
    animation: cpq-pop 0.5s ease;
}

@keyframes cpq-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.cpq-result-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.55;
    margin: 0 0 4px;
}

.cpq-result-name {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--cpq-primary);
    margin: 0 0 12px;
}

/* ── Hybrid badge ── */
.cpq-hybrid-badge {
    margin-bottom: 14px;
}

.cpq-hybrid-label {
    display: inline-block;
    background: var(--cpq-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 50px;
}

.cpq-result-desc {
    font-size: 1.02rem;
    line-height: 1.65;
    opacity: 0.85;
    margin: 0 0 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Notes box ── */
.cpq-notes-box {
    background: rgba(59,31,15,0.06);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 18px;
    text-align: left;
    display: inline-block;
    min-width: 220px;
}

.cpq-notes-line {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cpq-primary);
}

.cpq-notes-line strong {
    color: var(--cpq-accent);
}

/* ── Secondary hint ── */
.cpq-secondary-hint {
    font-size: 0.88rem;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 14px;
}

/* ── Product box ── */
.cpq-product-divider {
    width: 48px;
    height: 3px;
    background: var(--cpq-accent);
    border-radius: 2px;
    margin: 20px auto 18px;
    opacity: 0.5;
}

.cpq-product-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.55;
    margin: 0 0 10px;
}

.cpq-product-img-wrap {
    margin-bottom: 14px;
}

.cpq-product-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(59,31,15,0.14);
    object-fit: cover;
}

.cpq-product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cpq-primary);
    margin: 0 0 14px;
}

.cpq-buy-btn {
    display: inline-block;
    padding: 13px 34px;
    background: var(--cpq-buy-bg);
    color: var(--cpq-buy-text);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--cpq-font);
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.cpq-buy-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: var(--cpq-buy-text);
    text-decoration: none;
}

.cpq-restart-btn {
    margin-top: 20px;
    font-size: 0.92rem;
}
