/*
 * Fragenbaum 2.0 — Panel Interaction Styles
 *
 * Scoped to .explorer-panel (260px wide dark panel).
 * All interactions use 1-col layout and dark-on-light colors.
 *
 * @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
 */

/* ============ Question Header ============ */
.explorer-panel .fb2-question-header {
    padding: 0.5rem 0.75rem 0.375rem;
}
.explorer-panel .fb2-question-text {
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 0.25rem;
    font-weight: 600;
}
.explorer-panel .fb2-question-help {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.35;
}

/* ============ Options container ============ */
.explorer-panel .fb2-options {
    padding: 0.125rem 0.625rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* ============ Shared option styles ============ */
.explorer-panel .fb2-option {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.4375rem 0.625rem;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, background .18s ease, transform .12s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    font: inherit;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}
.explorer-panel .fb2-option:hover {
    border-color: #2DD4BF;
    background: rgba(45, 212, 191, 0.15);
}
.explorer-panel .fb2-option--selected {
    border-color: #2DD4BF;
    background: rgba(45, 212, 191, 0.28);
    transform: scale(0.98);
}
.explorer-panel .fb2-option--exploration {
    border-style: dashed;
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.08);
}
.explorer-panel .fb2-option--exploration:hover {
    border-color: #FACC15;
    background: rgba(250, 204, 21, 0.18);
}
.explorer-panel .fb2-option-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}
.explorer-panel .fb2-option-label {
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.25;
    word-break: break-word;
    flex: 1;
}
/* Description moved to title-tooltip to save vertical space */
.explorer-panel .fb2-option-desc {
    display: none;
}

/* emoji-grid: 2x2 compact icons + label */
.explorer-panel .fb2-options--emoji-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
}
.explorer-panel .fb2-options--emoji-grid .fb2-option {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.375rem;
    min-height: 64px;
    gap: 0.25rem;
    text-align: center;
}
.explorer-panel .fb2-options--emoji-grid .fb2-option-icon {
    font-size: 1.5rem;
}
.explorer-panel .fb2-options--emoji-grid .fb2-option-label {
    font-size: 0.75rem;
    line-height: 1.2;
    flex: 0;
}

/* ============ Mood-Choice (compact grid) ============ */
.explorer-panel .fb2-options--mood-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
}
.explorer-panel .fb2-options--mood-choice .fb2-option {
    padding: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 0;
}
.explorer-panel .fb2-mood-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0F766E 0%, #0B1929 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.explorer-panel .fb2-mood-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.explorer-panel .fb2-mood-label {
    font-weight: 600;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
}

/* ============ Slider ============ */
.explorer-panel .fb2-slider-wrap {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.explorer-panel .fb2-slider-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2DD4BF;
    text-align: center;
}
.explorer-panel .fb2-slider {
    width: 100%;
    min-height: 40px;
    accent-color: #2DD4BF;
}
.explorer-panel .fb2-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
    gap: 0.25rem;
}
.explorer-panel .fb2-slider-labels span {
    text-align: center;
    flex: 1;
}

/* ============ Confirm button ============ */
.explorer-panel .fb2-confirm-btn {
    margin-top: 0.5rem;
    padding: 0.625rem 1rem;
    background: #2DD4BF;
    color: #0B1929;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    min-height: 42px;
    font-size: 0.875rem;
    transition: background .15s ease, opacity .15s ease;
    width: 100%;
}
.explorer-panel .fb2-confirm-btn:hover:not([disabled]) {
    background: #14B8A6;
}
.explorer-panel .fb2-confirm-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============ Swipe-Cards ============ */
.explorer-panel .fb2-options--swipe-cards {
    padding: 0.5rem 0.75rem 0.75rem;
}
.explorer-panel .fb2-swipe-progress {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.375rem;
}
.explorer-panel .fb2-swipe-stack {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.explorer-panel .fb2-swipe-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
    animation: fb2-card-in 0.3s ease-out;
}
@keyframes fb2-card-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.explorer-panel .fb2-swipe-card-bg {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0F766E, #0B1929);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.explorer-panel .fb2-swipe-card-bg .fb2-mood-icon {
    font-size: 2.25rem;
}
.explorer-panel .fb2-swipe-card-body {
    padding: 0.625rem 0.75rem;
}
.explorer-panel .fb2-swipe-card-body h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    color: #fff;
}
.explorer-panel .fb2-swipe-card-body p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.35;
}
.explorer-panel .fb2-swipe-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.625rem;
}
.explorer-panel .fb2-swipe-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: transform .15s ease;
}
.explorer-panel .fb2-swipe-controls button:hover {
    transform: scale(1.1);
}
.explorer-panel .fb2-swipe-no {
    background: rgba(255, 255, 255, 0.12);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
}
.explorer-panel .fb2-swipe-yes {
    background: #16A34A;
    color: #fff;
}

/* ============ Country Chips (explore mode) ============ */
.explorer-panel .fb2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.375rem 0;
    min-height: 18px;
}
.explorer-panel .fb2-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.25);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    border: 1px solid rgba(45, 212, 191, 0.4);
    transition: background .15s ease;
}
.explorer-panel .fb2-chip:hover { background: rgba(248, 113, 113, 0.3); border-color: rgba(248, 113, 113, 0.5); }

/* ============ Map Hint (per-question) ============ */
.explorer-panel .fb2-map-hint {
    font-size: 0.7rem;
    color: #FACC15;
    margin: 0.25rem 0 0;
    line-height: 1.3;
    background: rgba(250, 204, 21, 0.1);
    padding: 0.25rem 0.375rem;
    border-radius: 6px;
    border-left: 2px solid #FACC15;
}

/* ============ Country Picker (Q001 "Ja ich weiß wohin") ============ */
.explorer-panel .fb2-country-back {
    appearance: none;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.7rem;
    padding: 0.125rem 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.explorer-panel .fb2-country-back:hover { color: #fff; }
.explorer-panel .fb2-country-input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    box-sizing: border-box;
}
.explorer-panel .fb2-country-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.explorer-panel .fb2-country-input:focus {
    outline: none;
    border-color: #2DD4BF;
    background: rgba(255, 255, 255, 0.12);
}
.explorer-panel .fb2-country-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.explorer-panel .fb2-country-tree {
    margin-top: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    /* no max-height: the outer .fb2-options scrolls */
}
.explorer-panel .fb2-region {
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.explorer-panel .fb2-region[open] { background: rgba(255, 255, 255, 0.07); }
.explorer-panel .fb2-region-summary {
    list-style: none;
    padding: 0.4375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}
.explorer-panel .fb2-region-summary::-webkit-details-marker { display: none; }
.explorer-panel .fb2-region-summary::after {
    content: '+';
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    font-size: 0.95rem;
}
.explorer-panel .fb2-region[open] .fb2-region-summary::after { content: '\2013'; }
.explorer-panel .fb2-region .fb2-country-list {
    padding: 0.125rem 0.25rem 0.375rem 0.25rem;
}
.explorer-panel .fb2-country-empty {
    margin: 0.5rem 0;
    color: rgba(255,255,255,.5);
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
}
.explorer-panel .fb2-country-item {
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background .15s ease;
}
.explorer-panel .fb2-country-item:hover,
.explorer-panel .fb2-country-item:focus {
    background: rgba(45, 212, 191, 0.25);
    outline: none;
}
.explorer-panel .fb2-country-item--empty {
    color: rgba(255, 255, 255, 0.45);
    cursor: default;
    background: transparent;
}
.explorer-panel .fb2-country-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0.5rem 0 0;
    line-height: 1.35;
    font-style: italic;
}

/* ============ Resume Dialog ============ */
.fb2-resume-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 25, 41, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: fb2-fade-in .18s ease-out;
}
@keyframes fb2-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.fb2-resume-dialog {
    background: #fff;
    color: var(--color-primary, #1B2A4A);
    border-radius: 14px;
    padding: 1.75rem 1.5rem 1.25rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    animation: fb2-pop-in .22s ease-out;
}
@keyframes fb2-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fb2-resume-title {
    margin: 0 0 0.625rem;
    font-size: 1.125rem;
    line-height: 1.3;
}
.fb2-resume-text {
    margin: 0 0 1.25rem;
    color: var(--color-text-secondary, #475569);
    font-size: 0.9375rem;
    line-height: 1.45;
}
.fb2-resume-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: flex-end;
}
.fb2-resume-btn {
    appearance: none;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    min-height: 44px;
    transition: background .15s ease, color .15s ease;
}
.fb2-resume-btn--primary {
    background: var(--color-secondary, #0B7E73);
    color: #fff;
}
.fb2-resume-btn--primary:hover { background: var(--color-primary, #1B2A4A); }
.fb2-resume-btn--secondary {
    background: #F1F5F9;
    color: var(--color-primary, #1B2A4A);
}
.fb2-resume-btn--secondary:hover { background: #E2E8F0; }

/* ============ Zoom-Tooltip (minimal country-name when zoomed in) ============ */
.fb2-zoom-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 0.375rem 0.625rem;
    background: rgba(11, 25, 41, 0.92);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.35);
    white-space: nowrap;
}

/* ============ Map Score Coloring ============ */
/* Smooth transition for country path fill changes */
#fb-map-wrap path[data-slug] {
    transition: fill 0.4s ease, opacity 0.4s ease;
}

/* Top match (80-100%): vibrant green */
#fb-map-wrap path.fb2-score-top {
    fill: #059669 !important;
    opacity: 1 !important;
}

/* Good match (50-79%): medium green */
#fb-map-wrap path.fb2-score-good {
    fill: #10B981 !important;
    opacity: 0.95 !important;
}

/* Mid match (30-49%): light green */
#fb-map-wrap path.fb2-score-mid {
    fill: #6EE7B7 !important;
    opacity: 0.85 !important;
}

/* Low match (10-29%): very pale green */
#fb-map-wrap path.fb2-score-low {
    fill: #A7F3D0 !important;
    opacity: 0.7 !important;
}

/* Out / no match (<10%): gray — only truly non-matching */
#fb-map-wrap path.fb2-score-out {
    fill: #CBD5E1 !important;
    opacity: 0.4 !important;
}

/* ===== Pin score visual weight ===== */
/* Pins inherit the country score. Top-match pins are fully visible,
   low-match pins shrink and fade. Uses translate(-50%,-50%) to
   preserve centering from worldmap-pin base class. */
.worldmap-pin.fb2-pin-top {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
    filter: saturate(1.2);
}
.worldmap-pin.fb2-pin-good {
    opacity: 0.95 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}
.worldmap-pin.fb2-pin-mid {
    opacity: 0.7 !important;
    transform: translate(-50%, -50%) scale(0.85) !important;
    filter: saturate(0.7);
}
.worldmap-pin.fb2-pin-low {
    opacity: 0.45 !important;
    transform: translate(-50%, -50%) scale(0.7) !important;
    filter: saturate(0.4) brightness(1.1);
}
.worldmap-pin.fb2-pin-out {
    opacity: 0.25 !important;
    transform: translate(-50%, -50%) scale(0.55) !important;
    filter: saturate(0.2) brightness(1.2);
}

/* ===== Pet warning on overseas insets ===== */
.fb2-pet-warning {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: help;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.fb2-pet-warning svg {
    width: 12px;
    height: 12px;
    fill: white;
}
/* Red: pet travel impossible (legally forbidden / physically unreachable) */
.fb2-pet-warning--red {
    background: #DC2626;
}
/* Yellow: pet travel not recommended (stressful flight, extra paperwork) */
.fb2-pet-warning--yellow {
    background: #EAB308;
}
.fb2-pet-warning--yellow svg {
    fill: #422006;
}

/* ============ Error ============ */
.explorer-panel .fb2-error {
    padding: 0.875rem;
    background: rgba(220, 38, 38, 0.15);
    color: #FCA5A5;
    border-radius: 8px;
    margin: 0.5rem;
    font-size: 0.8125rem;
}
