/* WatchFullStory Tools - Shared Styles
   All selectors use .wft-tool prefix for high specificity
   to override any theme text-color inheritance */

/* ─── BASE CONTAINER ─── */
.wft-tool,
.wft-tool *,
.wft-tool *::before,
.wft-tool *::after {
    box-sizing: border-box;
}

.wft-tool {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 720px;
    margin: 30px auto;
    background: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    padding: 28px 24px;
    color: #1a1a1a !important;
    border: 1px solid #e8e8e8;
}

.wft-tool h2 {
    font-size: 1.4rem !important;
    margin: 0 0 6px 0 !important;
    color: #111111 !important;
    background: transparent !important;
}

.wft-tool p,
.wft-tool span,
.wft-tool label,
.wft-tool div {
    color: inherit;
}

.wft-tool .wft-subtitle {
    font-size: 0.9rem !important;
    color: #555555 !important;
    margin-bottom: 20px !important;
    background: transparent !important;
}

/* ─── INPUTS ─── */
.wft-input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wft-tool .wft-input-row input,
.wft-tool .wft-input-row select,
.wft-tool input[type="text"],
.wft-tool input[type="date"],
.wft-tool select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: border 0.2s;
    outline: none !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
}

.wft-tool .wft-input-row input:focus,
.wft-tool .wft-input-row select:focus,
.wft-tool input[type="text"]:focus,
.wft-tool input[type="date"]:focus,
.wft-tool select:focus {
    border-color: #e63946 !important;
}

.wft-tool input::placeholder {
    color: #aaaaaa !important;
}

/* ─── BUTTON ─── */
.wft-tool .wft-btn {
    background: #e63946 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 22px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s;
    white-space: nowrap;
    text-decoration: none !important;
    display: inline-block;
    line-height: normal !important;
    box-shadow: none !important;
}

.wft-tool .wft-btn:hover {
    background: #c1121f !important;
    color: #ffffff !important;
}

.wft-tool .wft-btn:disabled {
    background: #cccccc !important;
    color: #888888 !important;
    cursor: not-allowed;
}

/* ─── RESULT BOX ─── */
.wft-tool .wft-result {
    background: #f7f7f7 !important;
    border-radius: 10px;
    padding: 20px;
    margin-top: 16px;
    display: none;
    border: 1px solid #eeeeee;
}

.wft-tool .wft-result.active {
    display: block;
}

.wft-tool .wft-result h3 {
    margin: 0 0 8px 0 !important;
    font-size: 1.15rem !important;
    color: #e63946 !important;
    background: transparent !important;
}

.wft-tool .wft-result p {
    margin: 4px 0 !important;
    font-size: 0.95rem !important;
    color: #333333 !important;
    background: transparent !important;
}

/* ─── BADGES ─── */
.wft-tool .wft-badge {
    display: inline-block !important;
    background: #e63946 !important;
    color: #ffffff !important;
    border-radius: 20px;
    padding: 3px 12px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-right: 6px;
    margin-bottom: 6px;
}

.wft-tool .wft-badge.green { background: #2d6a4f !important; color: #ffffff !important; }
.wft-tool .wft-badge.orange { background: #e07a00 !important; color: #ffffff !important; }
.wft-tool .wft-badge.grey { background: #666666 !important; color: #ffffff !important; }

/* ─── LOADING SPINNER ─── */
.wft-tool .wft-loading {
    text-align: center;
    padding: 20px;
    color: #888888 !important;
    display: none;
    background: transparent !important;
}

.wft-tool .wft-loading.active { display: block; }

.wft-tool .wft-loading p {
    color: #888888 !important;
}

.wft-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eeeeee;
    border-top-color: #e63946;
    border-radius: 50%;
    animation: wft-spin 0.7s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes wft-spin {
    to { transform: rotate(360deg); }
}

/* ─── ERROR BOX ─── */
.wft-tool .wft-error {
    color: #c1121f !important;
    background: #fff0f0 !important;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 0.92rem !important;
    display: none;
    border: 1px solid #ffcccc;
}

.wft-tool .wft-error.active { display: block; }

/* ─── QUIZ ─── */
.wft-tool .wft-quiz-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.wft-tool .wft-quiz-meta select {
    padding: 8px 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    flex: 1;
    min-width: 180px;
    background: #ffffff !important;
    color: #1a1a1a !important;
}

.wft-tool .wft-quiz-progress {
    font-size: 0.85rem;
    color: #666666 !important;
    margin-bottom: 14px;
    background: transparent !important;
}

.wft-quiz-progress-bar {
    height: 6px;
    background: #eeeeee;
    border-radius: 3px;
    margin-bottom: 18px;
    overflow: hidden;
}

.wft-quiz-progress-bar span {
    display: block;
    height: 100%;
    background: #e63946;
    border-radius: 3px;
    transition: width 0.3s;
}

.wft-tool .wft-question {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    line-height: 1.4;
    color: #111111 !important;
    background: transparent !important;
}

.wft-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wft-tool .wft-option {
    background: #f4f4f4 !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    cursor: pointer !important;
    font-size: 0.97rem !important;
    transition: all 0.15s;
    text-align: left !important;
    color: #111111 !important;
    width: 100% !important;
    display: block !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.wft-tool .wft-option:hover {
    border-color: #e63946 !important;
    background: #fff5f5 !important;
    color: #111111 !important;
}

.wft-tool .wft-option.correct {
    border-color: #2d6a4f !important;
    background: #d8f3dc !important;
    color: #1b4332 !important;
}

.wft-tool .wft-option.wrong {
    border-color: #c1121f !important;
    background: #ffe0e0 !important;
    color: #7d0000 !important;
}

.wft-tool .wft-option:disabled {
    cursor: default !important;
    opacity: 1 !important;
}

.wft-tool .wft-quiz-score {
    text-align: center;
    padding: 20px 0 10px;
    background: transparent !important;
}

.wft-tool .wft-quiz-score .wft-score-number {
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: #e63946 !important;
    background: transparent !important;
}

.wft-tool .wft-quiz-score p {
    color: #555555 !important;
    margin: 8px 0 !important;
}

/* ─── MOOD PICKER ─── */
.wft-mood-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.wft-tool .wft-mood-btn {
    background: #f4f4f4 !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 20px !important;
    padding: 7px 16px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.15s;
    font-weight: 600 !important;
    color: #222222 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1.4 !important;
}

.wft-tool .wft-mood-btn:hover,
.wft-tool .wft-mood-btn.active {
    background: #e63946 !important;
    border-color: #e63946 !important;
    color: #ffffff !important;
}

.wft-mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.wft-tool .wft-mood-card {
    background: #f8f8f8 !important;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #eeeeee;
    transition: box-shadow 0.15s;
}

.wft-tool .wft-mood-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.wft-tool .wft-mood-card .wft-mood-title {
    font-weight: 700 !important;
    font-size: 0.97rem !important;
    margin-bottom: 4px !important;
    color: #111111 !important;
    background: transparent !important;
}

.wft-tool .wft-mood-card .wft-mood-type {
    font-size: 0.78rem !important;
    color: #888888 !important;
    margin-bottom: 10px !important;
    background: transparent !important;
}

.wft-tool .wft-mood-card a {
    display: inline-block !important;
    background: #e63946 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    padding: 5px 12px !important;
    border-radius: 6px;
    font-weight: 600 !important;
}

.wft-tool .wft-mood-card a:hover {
    background: #c1121f !important;
    color: #ffffff !important;
}

.wft-tool .wft-mood-count {
    font-size: 0.85rem !important;
    color: #888888 !important;
    margin-bottom: 12px !important;
    background: transparent !important;
}

/* ─── CELEB AGE ─── */
.wft-tool .wft-age-result-big {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    color: #e63946 !important;
    line-height: 1;
    margin: 10px 0 4px !important;
    background: transparent !important;
}

.wft-tool .wft-age-result-label {
    font-size: 0.9rem !important;
    color: #666666 !important;
    margin-bottom: 14px !important;
    background: transparent !important;
}

/* ─── AUTOCOMPLETE SUGGESTIONS ─── */
.wft-tool #wft-age-suggestions {
    background: #ffffff !important;
    border: 1px solid #eeeeee !important;
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.wft-tool .wft-suggestion-item {
    color: #1a1a1a !important;
    background: #ffffff !important;
}

.wft-tool .wft-suggestion-item:hover {
    background: #f5f5f5 !important;
    color: #1a1a1a !important;
}

.wft-tool .wft-suggestion-item strong {
    color: #111111 !important;
}

.wft-tool .wft-suggestion-item span {
    color: #888888 !important;
}

/* ─── BIRTHDAY LIST ─── */
.wft-birthday-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wft-tool .wft-birthday-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f8f8 !important;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #eeeeee;
}

.wft-tool .wft-birthday-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e63946 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    flex-shrink: 0;
}

.wft-tool .wft-birthday-name {
    font-weight: 700 !important;
    font-size: 0.97rem !important;
    color: #111111 !important;
    background: transparent !important;
}

.wft-tool .wft-birthday-detail {
    font-size: 0.82rem !important;
    color: #777777 !important;
    background: transparent !important;
}

/* ─── WHERE TO WATCH ─── */
.wft-platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.wft-tool .wft-platform {
    background: #f4f4f4 !important;
    border: 1px solid #dddddd !important;
    border-radius: 8px;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #333333 !important;
}

.wft-tool .wft-platform.available {
    background: #d8f3dc !important;
    border-color: #2d6a4f !important;
    color: #1b4332 !important;
}

/* Result items in search list */
.wft-tool .wft-result-item {
    color: #1a1a1a !important;
    background: #ffffff !important;
}

.wft-tool .wft-result-item strong {
    color: #111111 !important;
}

/* Inline small text / notes */
.wft-tool p[style*="color:#bbb"],
.wft-tool p[style*="color: #bbb"] {
    color: #aaaaaa !important;
}

/* Warning box (no API key) */
.wft-tool div[style*="background:#fff8e1"] {
    color: #5d4037 !important;
}

/* ─── BINGE STATS ─── */
.wft-tool .wft-binge-stat-label {
    font-size: 0.82rem !important;
    color: #666666 !important;
    background: transparent !important;
}

.wft-tool #wft-binge-pace {
    background: #f0f0f0 !important;
    color: #333333 !important;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem !important;
}

.wft-tool #wft-binge-status {
    color: #555555 !important;
    font-size: 0.88rem !important;
}

/* Show status summary */
.wft-tool #wft-status-summary {
    color: #444444 !important;
    background: transparent !important;
}

.wft-tool #wft-status-more {
    color: #e63946 !important;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
    .wft-tool { padding: 18px 14px !important; }
    .wft-input-row { flex-direction: column; }
    .wft-mood-grid { grid-template-columns: 1fr 1fr; }
    .wft-tool .wft-age-result-big { font-size: 2.5rem !important; }
}
