/* Ship Tea Cruise Quiz — Scoped Styles */

.shiptea-quiz-wrapper {
    --st-ocean: #0077B6;
    --st-teal: #008080;
    --st-sunset: #FF6B35;
    --st-sand: #FFF1E6;
    --st-navy: #023E73;
    --st-white: #ffffff;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
    color: var(--st-navy);
}

.shiptea-quiz-wrapper *, .shiptea-quiz-wrapper *::before, .shiptea-quiz-wrapper *::after {
    box-sizing: border-box;
}

/* Intro */
.shiptea-quiz-intro {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--st-sand), var(--st-white));
    border-radius: 16px;
    border: 2px solid var(--st-ocean);
}

.shiptea-quiz-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: stq-bob 2s ease-in-out infinite;
}

@keyframes stq-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.shiptea-quiz-intro h2 {
    font-size: 1.8rem;
    color: var(--st-navy);
    margin: 0 0 0.75rem;
}

.shiptea-quiz-subtitle {
    font-size: 1.05rem;
    color: #555;
    margin: 0 0 2rem;
    line-height: 1.5;
}

.shiptea-quiz-start-btn,
.shiptea-quiz-retake-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--st-white);
    background: var(--st-sunset);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.shiptea-quiz-start-btn:hover,
.shiptea-quiz-retake-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.35);
}

/* Progress bar */
.shiptea-quiz-progress {
    margin: 1.5rem 0;
    text-align: center;
}

.shiptea-quiz-progress-bar {
    position: relative;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: visible;
    margin-bottom: 0.5rem;
}

.shiptea-quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--st-ocean), var(--st-teal));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.shiptea-quiz-progress-ship {
    position: absolute;
    top: -14px;
    left: 0%;
    font-size: 1.5rem;
    transition: left 0.5s ease;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

.shiptea-quiz-progress-text {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

/* Question card */
.shiptea-quiz-question-area {
    perspective: 800px;
}

.shiptea-quiz-card {
    background: var(--st-white);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--st-ocean);
    box-shadow: 0 4px 20px rgba(0,119,182,0.1);
    animation: stq-slideIn 0.4s ease-out;
}

@keyframes stq-slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.shiptea-quiz-card.stq-exit {
    animation: stq-slideOut 0.3s ease-in forwards;
}

@keyframes stq-slideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-40px); }
}

.shiptea-quiz-question-text {
    font-size: 1.3rem;
    color: var(--st-navy);
    margin: 0 0 1.5rem;
    line-height: 1.4;
}

.shiptea-quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shiptea-quiz-answer-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    text-align: left;
    background: var(--st-sand);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    color: var(--st-navy);
    line-height: 1.4;
    font-family: inherit;
}

.shiptea-quiz-answer-btn:hover {
    border-color: var(--st-ocean);
    background: var(--st-white);
    transform: translateX(4px);
}

.shiptea-quiz-answer-btn.stq-selected {
    border-color: var(--st-sunset);
    background: #fff3ed;
}

/* Loading spinner */
.shiptea-quiz-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.shiptea-quiz-wheel {
    font-size: 4rem;
    display: inline-block;
    animation: stq-spin 1.5s linear infinite;
}

@keyframes stq-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.shiptea-quiz-loading p {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--st-navy);
    font-weight: 600;
}

/* Result card */
.shiptea-quiz-result {
    animation: stq-fadeIn 0.6s ease-out;
}

@keyframes stq-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.shiptea-quiz-result-card {
    text-align: center;
    background: linear-gradient(135deg, var(--st-sand), var(--st-white));
    border-radius: 16px;
    padding: 2.5rem 2rem;
    border: 3px solid var(--st-ocean);
    box-shadow: 0 8px 30px rgba(0,119,182,0.15);
}

.shiptea-quiz-result-emoji {
    font-size: 5rem;
    margin-bottom: 0.5rem;
}

.shiptea-quiz-result-card h2 {
    font-size: 1.6rem;
    color: var(--st-navy);
    margin: 0 0 0.25rem;
}

.shiptea-quiz-result-card h3 {
    font-size: 1.15rem;
    color: var(--st-ocean);
    margin: 0 0 1.25rem;
    font-weight: 600;
}

.shiptea-quiz-result-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin: 0 0 1.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.shiptea-quiz-result-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.shiptea-quiz-trait-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--st-ocean);
    color: var(--st-white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Share buttons */
.shiptea-quiz-share {
    margin-bottom: 1.5rem;
}

.shiptea-quiz-share p {
    font-size: 0.9rem;
    color: #888;
    margin: 0 0 0.75rem;
}

.shiptea-quiz-share-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.shiptea-share-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    color: var(--st-white);
    font-family: inherit;
}

.shiptea-share-btn:hover { opacity: 0.85; }
.shiptea-share-twitter { background: #1a1a1a; }
.shiptea-share-facebook { background: #1877F2; }
.shiptea-share-threads { background: #000000; }
.shiptea-share-tiktok { background: #010101; }
.shiptea-share-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.shiptea-share-copy { background: var(--st-teal); }

/* Responsive */
@media (max-width: 768px) {
    .shiptea-quiz-intro { padding: 2rem 1.25rem; }
    .shiptea-quiz-intro h2 { font-size: 1.5rem; }
    .shiptea-quiz-card { padding: 1.5rem 1.25rem; }
    .shiptea-quiz-question-text { font-size: 1.15rem; }
    .shiptea-quiz-result-card { padding: 2rem 1.25rem; }
    .shiptea-quiz-result-card h2 { font-size: 1.35rem; }
}

@media (max-width: 400px) {
    .shiptea-quiz-wrapper { padding: 0 0.5rem; }
    .shiptea-quiz-intro h2 { font-size: 1.3rem; }
    .shiptea-quiz-start-btn, .shiptea-quiz-retake-btn { padding: 12px 28px; font-size: 1rem; }
    .shiptea-quiz-answer-btn { padding: 12px 14px; font-size: 0.95rem; }
    .shiptea-quiz-result-emoji { font-size: 3.5rem; }
}
