/**
 * ===================================================
 * Potential-Matcher - Explorer Addon
 * ===================================================
 * Allgemeine Styles für Talentfinder-Quiz
 * 
 * @copyright (c) 2026 Leif Stuhrmann
 * @license   Proprietär - Alle Rechte vorbehalten
 * ===================================================
 */

:root {
    --explorer-primary: #4f46e5;
    --explorer-success: #10b981;
    --explorer-warning: #f59e0b;
    --explorer-danger: #ef4444;
    --explorer-light: #f3f4f6;
    --explorer-dark: #1f2937;
}


html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.explorer-page {
    padding: 2rem 1rem;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1; /* keep content above animated background */
}

/* Animated squares background (Demo 2-like) */
.explorer-bg-squares {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    opacity: 0.6;
}

/* Swiper-specific small fixes to ensure slides don't block interaction */
.explorer-swiper .swiper-slide {
    background: transparent !important;
    pointer-events: auto !important;
}
.explorer-swiper .swiper-wrapper {
    /* allow vertical page scroll while enabling horizontal swipe */
    touch-action: pan-y;
}



/* Hide default Swiper navigation arrows inside explorer swipers (remove blue edge chevrons) */
.explorer-swiper .swiper-button-next,
.explorer-swiper .swiper-button-prev,
.explorer-top-swiper .swiper-button-next,
.explorer-top-swiper .swiper-button-prev,
.explorer-results-swiper .swiper-button-next,
.explorer-results-swiper .swiper-button-prev {
    display: none !important;
}
/* Confirmation overlay styles */
.explorer-confirm {
/* ... existing rules unchanged ... */

    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.0);
    z-index: 1500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.explorer-confirm.visible {
    opacity: 1;
    pointer-events: all;
    background: rgba(255,255,255,0.0);
}
.explorer-confirm-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.confirm-svg { width: 120px; height: 120px; }
.confirm-ring { stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 0.6s cubic-bezier(.2,.9,.2,1); }
.confirm-check { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 0.45s cubic-bezier(.2,.9,.2,1) 0.55s; }
.explorer-confirm.show-ring .confirm-ring { stroke-dashoffset: 0; }
.explorer-confirm.show-check .confirm-check { stroke-dashoffset: 0; }
.confirm-spinner { opacity: 0; transform: scale(0.8); transition: opacity 0.25s ease 0.2s, transform 0.3s ease 0.2s; }
.explorer-confirm.show-spinner .confirm-spinner { display: block; opacity: 1; transform: scale(1); }

/* modal used for enlarging images inside activity slides */
#explorerImageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    z-index: 1100; /* above most other elements */
}
#explorerImageModal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* ensure overlay sits inside quiz card and not full viewport */
.explorer-quiz-container { position: relative; }

.explorer-bg-squares .bg-square {
    position: absolute;
    display: block;
    background: rgba(230,134,15,0.06);
    border: 1px solid rgba(230,134,15,0.12);
    box-shadow: 0 6px 18px rgba(15,23,42,0.03) inset;
    transform: rotate(var(--rotate, 18deg));
    color: #e6860f;
    font-weight: 800;
    will-change: transform, opacity;
    /* animation parameters applied via CSS variables set inline */
}

.explorer-bg-squares .bg-square .bg-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(230,134,15,0.06);
    /* two animations: vertical float and opacity pulse; apply same delay to both */
    animation-name: floatXY, opacityPulse;
    animation-duration: var(--dur, 12s), calc(var(--dur, 12s) * 1.05);
    animation-timing-function: ease-in-out, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-delay: var(--delay, 0s), var(--delay, 0s);
}

.explorer-bg-squares .bg-square .bg-icon {
    /* Icon size scales with square size, clamped to readable range */
    font-size: clamp(12px, calc(var(--size) * 0.26), 36px);
    line-height: 1;
    transform: rotate(calc(var(--rotate, 0deg) * -1));
    display: inline-block;
    color: #e6860f;
    opacity: 0.95;
}

/* Opacity pulse from 0 -> base -> 0 (uses per-item --base-opacity) */
.explorer-bg-squares .bg-square .bg-inner {
    animation-name: floatXY, opacityPulse;
    animation-duration: var(--dur, 12s), calc(var(--dur, 12s) * 1.1);
    animation-timing-function: ease-in-out, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes floatXY {
    /* vertical ascent from bottom (0) to above the viewport (-110vh - size) while adding small horizontal drift */
    0%   { transform: translateX(0px) translateY(0px) scale(1); }
    25%  { transform: translateX(calc(var(--tx, 8px) * 0.5)) translateY(calc(-30vh)) scale(1.02); }
    50%  { transform: translateX(calc(var(--tx, 8px) * -0.2)) translateY(calc(-60vh)) scale(1.01); }
    75%  { transform: translateX(calc(var(--tx, 8px) * 0.3)) translateY(calc(-90vh)) scale(0.99); }
    100% { transform: translateX(calc(var(--tx, 8px) * 0.1)) translateY(calc(-110vh - var(--size))) scale(1); }
}

@keyframes opacityPulse {
    0% { opacity: 0; }
    35% { opacity: var(--base-opacity, 0.6); }
    65% { opacity: var(--base-opacity, 0.6); }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    .explorer-bg-squares { opacity: 0.45; }
    .explorer-bg-squares .bg-square { transform-origin: center; }
}

/* ============================================
   QUIZ CONTAINER
   ============================================ */

.explorer-quiz-wrapper {
    /* desktop/default: keep card comfortable at up to 600px */
    width: calc(100% - 2rem) !important;
    max-width: 600px !important;
    box-sizing: border-box; /* include padding in width calculation */
    margin: 0 auto;
    padding: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    align-self: center; /* in column-flex sicher zentrieren */
}

/* Smartphone (really small screens) override: allow full viewport minus safe padding */
@media (max-width: 480px) {
    .explorer-quiz-wrapper {
        width: calc(100% - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
    }
}

.explorer-quiz-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem; /* reduced from 2rem per request */
    width: 100%;
    overflow-x: hidden; /* ensure no horizontal overflow from inner elements */
}

/* Ensure any images inside the quiz/card never exceed the container width
   (fixes inline max-width:450px on the logo that caused overflow on small phones) */
.explorer-quiz-container img,
.explorer-quiz-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.explorer-progress {
    margin-bottom: 2rem;
}

.explorer-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--explorer-light);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.explorer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--explorer-primary), var(--explorer-success));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.explorer-progress-text {
    font-size: 0.875rem;
    color: var(--explorer-dark);
    font-weight: 600;
}

/* ============================================
   QUESTION LAYOUT
   ============================================ */

.explorer-question {
    margin-bottom: 2rem;
}

.explorer-question-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.explorer-question-icon {
    font-size: 1.5rem;
    color: var(--explorer-primary);
    flex-shrink: 0;
}

.explorer-question-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--explorer-dark);
    margin: 0;
}

.explorer-question-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ============================================
   ANSWER OPTIONS
   ============================================ */

.explorer-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.explorer-answer-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--explorer-light);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    user-select: none;
    min-height: 48px;
}

.explorer-answer-option:hover {
    border-color: var(--explorer-primary);
    background: rgba(79, 70, 229, 0.05);
}

.explorer-answer-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--explorer-primary);
}

.explorer-answer-option input[type="radio"]:checked + label {
    font-weight: 600;
    color: var(--explorer-primary);
}

.explorer-answer-option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    color: var(--explorer-dark);
    font-size: 0.95rem;
}

.explorer-answer-option.selected {
    border-color: var(--explorer-primary);
    background: rgba(79, 70, 229, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */

.explorer-button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.explorer-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explorer-btn-primary {
    background: var(--explorer-primary);
    color: white;
}

.explorer-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.explorer-btn-secondary {
    background: var(--explorer-light);
    color: var(--explorer-dark);
    border: 2px solid var(--explorer-dark);
}

.explorer-btn-secondary:hover {
    background: var(--explorer-dark);
    color: white;
}

.explorer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   RESPONSIVES DESIGN
   ============================================ */

@media (max-width: 768px) {
    .explorer-quiz-wrapper {
        margin: 1rem auto;
        padding: 0;
    }

    .explorer-quiz-container {
        /* keep same rounded corners on small screens */
        padding: 1.5rem;
    }

    .explorer-question-text {
        font-size: 1rem;
    }

    .explorer-button-group {
        flex-direction: column;
    }

    .explorer-btn {
        width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.explorer-answer-option:focus-within {
    outline: 2px solid var(--explorer-primary);
    outline-offset: 2px;
}

.explorer-btn:focus-visible {
    outline: 2px solid var(--explorer-primary);
    outline-offset: 2px;
}

/* Highlight / glow for intro title */

/* ============================================
   SWIPER
   ============================================ */

/* Make Swiper slides responsive: force slides & wrapper to never exceed container width.
   This overrides inline widths applied by Swiper JS and prevents horizontal overflow on mobile. */
#explorerSwiper, .explorer-swiper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
.explorer-swiper .swiper-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}
.explorer-swiper .swiper-slide {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.explorer-swiper .swiper-slide img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Results cards swiper (Potentials <-> Answers) */
.explorer-results-swiper { position: relative; width: 100%; overflow: visible; padding: 0.5rem 0 0.75rem; perspective: 900px; z-index: 12; }
.explorer-results-swiper .ers-track { display: flex; transition: transform 0.45s ease; will-change: transform; transform-style: preserve-3d; }
.explorer-results-swiper .ers-slide { flex: 0 0 100%; max-width: 100%; padding: 0 0.5rem; box-sizing: border-box; backface-visibility: hidden; }
.explorer-results-swiper .ers-slide .card { height: 100%; }
.explorer-results-swiper .ers-slide { transform-origin: 50% 50%; }



/* Force activity card to never exceed container and always be centered */
.explorer-activity-slide {
    /* Card container: centered, fixed max-width, visual card styling
       keep slide as block so Swiper measurements & gestures stay correct */
    max-width: 600px !important;
    width: 100% !important;
    margin: 0 auto !important;
    position: relative;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
    box-sizing: border-box;
    padding: 0; /* inner padding applied to body */
}

/* Ensure activity cards inside result/top swipers match the quiz card width and are centered
   so images and content don't stretch to full viewport width like old Carousel items. */
.explorer-results-swiper .ers-slide .explorer-activity-slide,
.explorer-top-swiper .swiper-slide .explorer-activity-slide,
.explorer-swiper .swiper-slide .explorer-activity-slide {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ers-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.75rem; }
.ers-dot { width: 10px; height: 10px; border-radius: 999px; border: none; background: rgba(0,0,0,0.12); padding: 0; cursor: pointer; transition: transform 0.18s ease, background 0.18s ease; }
.ers-dot.active { background: var(--explorer-primary); transform: scale(1.2); }

/* subtle 3D feel on slides */
.explorer-results-swiper .ers-slide { transition: transform 0.45s cubic-bezier(.22,.9,.29,1); }

/* ensure small screens have comfortable spacing */
@media (max-width: 768px) {
    .explorer-results-swiper { padding: 0.5rem 0; }
    .ers-dot { width: 9px; height: 9px; }
}
.explorer-highlight {
    display: inline-block;
    color: inherit;
    animation: explorer-glow 6s ease-in-out infinite;
    will-change: color, text-shadow;
}

.explorer-highlight-text {
    display: inline-block;
    animation: explorer-glow-subtle 7s ease-in-out infinite;
}

@keyframes explorer-glow {
    0% { color: inherit; text-shadow: none; }
    30% { color: #e6860f; text-shadow: 0 0 8px rgba(230,134,15,0.85), 0 0 18px rgba(230,134,15,0.45); }
    60% { color: #e6860f; text-shadow: 0 0 10px rgba(230,134,15,0.95), 0 0 22px rgba(230,134,15,0.5); }
    100% { color: inherit; text-shadow: none; }
}

@keyframes explorer-glow-subtle {
    0% { color: #6b7280; text-shadow: none; }
    35% { color: #e6860f; text-shadow: 0 0 6px rgba(230,134,15,0.75); }
    65% { color: #e6860f; text-shadow: 0 0 8px rgba(230,134,15,0.85); }
    100% { color: #6b7280; text-shadow: none; }
}


/* ============================================
   POTENTIAL BADGES
   ============================================ */

.explorer-potentials-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.explorer-potential-badge {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-left: 4px solid #4f46e5;
    border-radius: 0.5rem;
    animation: fade-in 0.5s ease;
}

.explorer-potential-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #4f46e5;
}

.explorer-potential-content {
    flex: 1;
}

.explorer-potential-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.explorer-potential-score {
    font-size: 0.875rem;
    color: #6b7280;
}

.explorer-potential-score-bar {
    width: 100%;
    height: 10px;
    background: #eef2f7;
    border-radius: 999px;
    margin-top: 0.4rem;
    overflow: hidden;
    opacity: 1;
    transition: opacity 220ms ease;
}

.explorer-potential-score-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
    /* default gradient, can be overridden per-instance via --explorer-bar-color */
    background: var(--explorer-bar-color, linear-gradient(90deg, #4f46e5, #10b981));
}

/* Animated reveal for area label + percentage */
.explorer-area-label { display: block; opacity: 1; transform: translateY(0); transition: opacity 0.45s ease, transform 0.45s ease; }
.explorer-area-label.hidden { opacity: 0; transform: translateY(6px); }
.explorer-area-pct { transition: opacity 0.3s ease, transform 0.3s ease; }

/* smaller devices - keep animation timings slightly shorter */
@media (max-width: 768px) {
    .explorer-potential-score-fill { transition-duration: 0.5s; }
    .explorer-area-label { transition-duration: 0.35s; }
}

/* Area label + percent to be styled via CSS (moved from inline JS) */
.explorer-area-label {
    font-weight: 600;
    color: #111827;
}
.explorer-area-pct {
    font-weight: 700;
}

/* hide navigation arrows inside the Allrounder (diverse) swiper – they overlap the content
   and are not needed when pagination dots are shown */
#explorerDiverseSwiper .swiper-button-prev,
#explorerDiverseSwiper .swiper-button-next {
    display: none !important;
}

/* clickable activity images should indicate zoom possibility */
.explorer-activity-image-link img {
    cursor: zoom-in;
}

/* more breathing room between pagination and last potential bar */
.explorer-results-pagination {
    margin-top: 1.5rem; /* increased per request */
}

/* ============================================
   ACTIVITY CARDS
   ============================================ */

.explorer-activities-section {
    margin-top: 2.5rem;
}

.explorer-activities-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.explorer-activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.explorer-activity-card {
    background: white;
    border: 1px solid #e6e9ee;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    transition: all 0.28s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.explorer-activity-card:hover {
    border-color: rgba(79,70,229,0.12);
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(31,41,55,0.08);
}

.explorer-activity-image {
    width: 100%;
    height: 120px;
    background: var(--explorer-light);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    object-fit: cover;
}

.explorer-activity-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.explorer-activity-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Area header for grouped results */
.explorer-area-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem;
    margin: 1rem 0 0.5rem 0;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4));
}

.explorer-area-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

/* Activities list inside area */
.explorer-activities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem 0;
}

/* Card internals */
.explorer-activity-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.explorer-activity-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.explorer-activity-score {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
}

.explorer-activity-desc {
    color: #475569;
    font-size: 0.86rem;
    margin: 0.25rem 0 0 0;
}

.explorer-no-activities {
    color: #6b7280;
    padding: 0.5rem 0.75rem;
}

/* ============================================
   RESULTS CONTAINER (Nach Wheel)
   ============================================ */

.explorer-results {
    animation: fade-in 0.5s ease;
}

.explorer-results-header {
    text-align: center;
    margin-bottom: 2rem;
}
    .explorer-main-results-header {
        margin-bottom: 1.25rem;
        position: relative;
        z-index: 1;
    }

    .explorer-results-title {
        font-size: 2rem;
        font-weight: 600;
        margin: 0;
    }
    .explorer-results-subtitle {
        font-size: 0.95rem;
        color: #6c757d;
        margin-top: 0.25rem;
    }

    /* Answer area segments: fixed, responsive width controlled by CSS
       JS must NOT set width inline — only background-color and tooltip are applied there. */
    .answer-area-seg {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    .answer-area-seg .color-segment {
        width: 28px;
        height: 12px;
        border-radius: 3px;
        flex: 0 0 28px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    }

    @media (max-width: 576px) {
        .answer-area-seg .color-segment {
            width: 20px;
            height: 10px;
            flex: 0 0 20px;
        }
        .explorer-results-title { font-size: 1.6rem; }
    }

    /* ensure tabs are pushed down when the main header is present */
    .explorer-results-tabs {
        /* move tabs down slightly so they sit just below the icons; smaller value
           brings the tabs closer to the icons while leaving room for them. */
        /* smaller gap between icons and tabs */
        margin-top: 2.25rem;
        position: relative; /* ensure stacking context */
        z-index: 5; /* keep tabs above the header */
    }

    /* wrapper for the two round icons sitting above the tabs */
    .explorer-results-actions {
        position: absolute;
        /* position relative to .explorer-quiz-container: place at the padding-top
           location and pull upwards to sit near the card border. Reduce pull slightly
           to increase the distance to the card border a bit. */
        top: 2rem; /* matches .explorer-quiz-container padding-top */
        transform: translateY(-1.2rem); /* slightly less pull -> icons sit slightly lower */
        right: 0.75rem;
        display: flex;
        gap: 0.5rem;
        z-index: 60; /* above tabs and other elements */
    }

    .explorer-action-icon {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: var(--explorer-primary);
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        text-decoration: none;
        font-size: 1rem;
    }
    .explorer-action-icon.home { background: var(--explorer-primary); color: #fff; }
    .explorer-action-icon.restart { background: var(--explorer-success); color: #fff; }
    .explorer-action-icon:hover {
        filter: brightness(0.9);
    }

.explorer-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.explorer-results-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.explorer-results-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    justify-content: center;
}

.explorer-results-empty {
    text-align: center;
    color: #6b7280;
    padding: 1rem;
}

/* ============================================
   RESULTS TABS 
   ============================================ */

.explorer-results-tabs { border-bottom: 0; display:flex; gap:0.5rem; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; align-items:center; position:relative; }
.explorer-results-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    color: #374151;
    font-weight: 600;
    padding: 0.6rem 1rem;
    display:flex;
    align-items:center;
    gap:0.5rem;
    white-space: nowrap; /* prevent internal wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}
.explorer-results-tabs .nav-item { display:flex; }

/* hide native scrollbar but allow scrolling */
.explorer-results-tabs::-webkit-scrollbar { height: 0; }
.explorer-results-tabs { -ms-overflow-style: none; scrollbar-width: none; }

/* scroll arrow overlays */
.tabs-scroll-btn { position: absolute; top: auto; bottom: auto; transform: translateY(0); background: rgba(255,255,255,0.95); border-radius: 999px; border: 1px solid rgba(0,0,0,0.06); width: 36px; height: 36px; display:flex; align-items:center; justify-content:center; box-shadow: 0 6px 18px rgba(15,23,42,0.08); cursor: pointer; z-index: 60; }
.tabs-scroll-btn.left { /* left is positioned inline via JS */ }
.tabs-scroll-btn.right { /* right is positioned inline via JS */ }
.tabs-scroll-btn i { color: #374151; font-size: 1rem; }

/* when overflow left/right present we show buttons; hidden by default (JS toggles .visible) */
.tabs-scroll-btn { display: none; }
.tabs-scroll-btn.visible { display: flex; }
.explorer-results-tabs .tab-pane { padding: 1rem 0; }

/* Smaller font for answers list in Overview */
#tab-overview .list-group-item {
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
    position: relative; /* allow absolute segments */
}

/* Overview card that groups answers + potentials */
.explorer-overview-card { border-radius: 0.75rem; border: 1px solid #e6e9ee; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,0.04); margin-top: 0.75rem; }
.explorer-overview-card .card-body { padding: 1rem; }
.explorer-overview-card .card-header { background: transparent; border-bottom: 0; padding: 0.75rem 1rem 0 1rem; }
.explorer-overview-card .card-header i { color: var(--explorer-primary); font-size: 1.25rem; margin-right: 0.5rem; }

/* Potenzialbereiche title size + icon (match Answers header size) */
.explorer-potentials-title {
    font-size: 1.05rem; /* match h5 used for Deine Antworten */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
}
.explorer-potentials-title i { color: var(--explorer-primary); font-size: 1.05rem; }

/* small color-segments shown at top-right of an answer item */
.answer-area-seg {
    /* place segments inline at the right end of the item, avoid absolute overlay */
    position: static;
    display: inline-flex;
    float: right;
    gap: 6px;
    align-items: center;
    margin-left: 0.75rem;
}
.answer-area-seg .color-segment { height: 8px; width: 28px; border-radius: 4px; display: block; box-shadow: 0 2px 6px rgba(15,23,42,0.06); }
.answer-area-seg .color-segment.small { height: 6px; width: 18px; }

/* If server-rendered .potential-color-bar is injected inside the small segment wrapper,
   remove its background/border so only the colored segments are visible. */
.answer-area-seg .potential-color-bar {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 0 !important;
}
.answer-area-seg .potential-color-bar .color-segment {
    /* ensure segments use the small fixed sizing here and no inset shadow */
    height: 8px !important;
    width: 28px !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    display: block !important;
    flex: 0 0 28px !important;
    margin: 0 !important;
}

/* Title and label styles for answers list (moved from inline JS) */
.explorer-answer-question-title {
    display: block;
    margin-bottom: 0.25rem;
}
.explorer-answer-anslabel {
    font-weight: 600;
    margin-right: 0.4rem;
}

/* Area chips */
.explorer-area-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.explorer-area-chip.badge {
    border-left-width: 6px;
    padding: 0.4rem 0.6rem;
}

/* Carousel styles removed — using Swiper for slides now */

/* Rank ribbon: circular number on top-left of carousel item */
.rank-ribbon { position: absolute; left: 12px; top: 12px; background: var(--explorer-primary); color: #fff; width: 44px; height: 44px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-weight:800; box-shadow: 0 6px 18px rgba(79,70,229,0.15); }

/* Activity chips inside cards */
.explorer-activity-chips .explorer-area-chip { margin-right: 0.25rem; margin-bottom: 0.25rem; }

/* Improve score badge */
.explorer-activity-score.badge {
    background: linear-gradient(90deg, var(--explorer-primary), #3b82f6);
    color: #fff;
    font-weight: 700;
}

/* Header / flags inside activity card */
.explorer-activity-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}
.activity-flags { display:flex; gap:0.4rem; align-items:center; }
.desktop-flag-icon { width:28px; height:28px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; }
.desktop-flag-icon i { font-size:0.95rem; }
.top-right-badges { display:flex; gap:0.4rem; align-items:center; }

/* make flag icons clearly interactive */
.desktop-flag-icon { cursor: pointer; }
.activity-flags a { display:inline-block; }


/* Potentials: bottom full-width layout */
.explorer-potentials-bottom { width:100%; }
.explorer-pot-row { margin-bottom: 0.6rem; }
.explorer-pot-label { display:flex; align-items:center; gap:0.5rem; font-weight:600; }
.explorer-pot-name { font-weight:600; }
.explorer-pot-value { color:#6b7280; font-weight:700; }
.explorer-pot-bar { width:100%; height:12px; background:#eef2f7; border-radius:999px; overflow:hidden; margin-top:0.35rem; }
.explorer-pot-fill { height:100%; width:0%; transition: width 0.6s ease; }

/* Reduce spacing between info rows (user wanted smaller gaps) */
.explorer-activity-info-list .mb-1 { margin-bottom: 0.35rem !important; }

/* images at top of activity cards should have rounded top corners matching the card */
.explorer-activity-slide .explorer-activity-media {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    overflow: hidden; /* ensure the rounding clips the image */
}
.explorer-activity-slide .explorer-activity-media img {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

@media (max-width: 768px) {
    /* Mobile: image stays above the body and fills card width; body has padding */
    .explorer-activity-slide { display: block; }
    .explorer-activity-slide .explorer-activity-media {
        width: 100%;
        background: #f8fafc;
        display: block;
        overflow: hidden;
    }

    .explorer-activity-slide .explorer-activity-media img {
        /* width-driven sizing: image fills card width, height scales accordingly */
        width: 100%;
        height: auto;
        display: block;
        margin: 0;
        object-fit: cover;
    }

    .explorer-activity-slide .explorer-activity-body {
        padding: 0.75rem 1rem;
        display: block;
    }

    .explorer-activity-slide .explorer-activity-main { margin-bottom: 0.5rem; }
    .explorer-activity-slide .explorer-activity-meta { text-align: right; }
    .explorer-activity-title { margin: 0 0 0.25rem 0; font-size: 1.05rem; font-weight: 600; }
    .explorer-activity-score.badge { font-size: 0.95rem; padding: 0.35rem 0.6rem; }

    .rank-ribbon { width: 40px; height: 40px; left: 10px; top: 10px; }
}

/* Wider / desktop layout for activity slides (applies when viewport >= 720px) */
@media (min-width: 720px) {
    /* Desktop: keep image on top (full-width) to match user's request.
       Body gets comfortable padding below the media. */
    .explorer-activity-slide { display: block; }
    .explorer-activity-slide .explorer-activity-media { width: 100%; display: block; overflow: hidden; }
    .explorer-activity-slide .explorer-activity-media img { width: 100%; height: auto; display: block; margin: 0; object-fit: cover; }
    .explorer-activity-slide .explorer-activity-body { padding: 1rem; display: block; }
}
