/* ============================================================
   JOLASH – ODZNAKI (RANGI) INSTRUKTORÓW
   instructor-badges.css
   ============================================================ */

/* ----------------------------------------------------------
   KONTENER
   ---------------------------------------------------------- */

.instructor-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

/* ----------------------------------------------------------
   POJEDYNCZA ODZNAKA – czysta ikona, zero tła/ramki
   ---------------------------------------------------------- */

.instructor-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.instructor-badge:hover  { transform: scale(1.1); }
.instructor-badge.is-open { transform: scale(1.1); opacity: 0.85; }

.instructor-badge:focus-visible {
    outline: 2px solid var(--badge-color, #555);
    outline-offset: 3px;
}

/* ----------------------------------------------------------
   IKONA – desktop
   ---------------------------------------------------------- */

.instructor-badge__icon {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    pointer-events: none;
}

.instructor-badge__icon--placeholder {
    display: block;
    width: 80px;
    height: 80px;
    font-size: 56px;
    line-height: 80px;
    text-align: center;
    pointer-events: none;
}

/* ----------------------------------------------------------
   UKRYTY SCHOWEK DANYCH – odczytywany przez JS
   ---------------------------------------------------------- */

.instructor-badge__tooltip {
    display: none !important;
}

/* ----------------------------------------------------------
   GLOBALNY TOOLTIP – dołączany przez JS do <body>
   ---------------------------------------------------------- */

.badge-global-tooltip {
    position: fixed;
    z-index: 99999;
    width: 260px;
    max-width: calc(100vw - 32px);
    padding: 12px 14px;
    border-radius: 10px;
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.28);
    pointer-events: none;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.badge-global-tooltip.is-visible {
    visibility: visible;
    opacity: 1;
}

.badge-global-tooltip strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.badge-global-tooltip p {
    font-size: 12px;
    line-height: 1.55;
    color: #d4d4d4;
    margin: 0;
}

/* ----------------------------------------------------------
   KOLORY RANG
   ---------------------------------------------------------- */

.instructor-badge--mastermind      { --badge-color: #7C5CBF; }
.instructor-badge--social_elite    { --badge-color: #C9297F; }
.instructor-badge--dofinansowane   { --badge-color: #2E9E6B; }
.instructor-badge--top_trainer     { --badge-color: #E8820C; }
.instructor-badge--kickstart       { --badge-color: #1A8FC1; }
.instructor-badge--product_leader  { --badge-color: #C9A227; }

/* ----------------------------------------------------------
   MOBILE – odznaki na pełną szerokość karty instruktora
   ---------------------------------------------------------- */

@media (max-width: 768px) {

    .badge-global-tooltip {
        font-size: 11px;
        width: calc(100vw - 32px);
        transition: none;
    }

    /* Karta: flex-wrap żeby odznaki i CTA spadały do nowego wiersza */
    #training-map-mobile-details .trainer {
        flex-wrap: wrap;
    }

    /* Odznaki – pełna szerokość, pod zdjęciem i danymi */
    #training-map-mobile-details .instructor-badges {
        width: 100%;
        flex: 0 0 100%;
        margin-top: 10px;
        padding-top: 10px;
        justify-content: flex-start;
        gap: 0;
    }

    /* 3 odznaki w rzędzie */
    #training-map-mobile-details .instructor-badge {
        flex: 0 0 33.333%;
        display: flex;
        justify-content: center;
        padding: 6px 0;
    }

    /* Ikona 100px na mobile */
    #training-map-mobile-details .instructor-badge__icon,
    #training-map-mobile-details .instructor-badge__icon--placeholder {
        width: 100px;
        height: 100px;
        font-size: 70px;
        line-height: 100px;
    }
}

/* ----------------------------------------------------------
   PRZYCISK "Szybki kontakt" w karcie instruktora
   Własna klasa – NIE dziedziczy fixed layoutu .training-fast-cta
   Widoczny tylko w mobile overlay mapy
   ---------------------------------------------------------- */

.trainer-quick-contact {
    display: none; /* ukryty domyślnie – pokazujemy tylko w mobile overlay */
}

#training-map-mobile-details .trainer-quick-contact {
    display: block;
    width: 100%;
    flex: 0 0 100%;
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 13px 16px;
    border-radius: 8px;
    background: #760000;
    color: #fff !important;
    font-family: 'Futura PT', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

#training-map-mobile-details .trainer-quick-contact:hover,
#training-map-mobile-details .trainer-quick-contact:active {
    background: #5a0000;
}

/* ----------------------------------------------------------
   NAGŁÓWEK SEKCJI RANG
   ---------------------------------------------------------- */

.instructor-badges-wrapper {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.instructor-badges-wrapper .instructor-badges {
    margin-top: 6px;
    padding-top: 0;
    border-top: none;
}

.instructor-badges-title {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.instructor-badges-hint {
    margin: 0 0 8px;
    font-size: 11px;
    color: #888;
}
