@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   InteractiveAnatomy - Apple Premium v5
   ============================================ */

:root {
    --ia-primary: #007aff;
    --ia-orange: #fc5000;
    --ia-text: #1d1d1f;
    --ia-text-dim: #86868b;
    --ia-bg: rgba(255, 255, 255, 0.55);
    --ia-border: rgba(255, 255, 255, 0.55);
    --ia-input-bg: rgba(255, 255, 255, 0.7);
    --ia-divider: rgba(0, 0, 0, 0.05);
}

.drhilmi-anatomy-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 0;
}

/* ---- LAYOUT ---- */
.drhilmi-main-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: start;
}

/* ---- IMAGE & PINS ---- */
.drhilmi-map-section { position: relative; }

.drhilmi-image-wrapper {
    position: relative !important;
    display: inline-block;
    width: 100%;
}

.drhilmi-main-image {
    display: block;
    max-width: 100% !important;
    max-height: 78vh !important;
    height: auto !important;
    margin: 0 auto;
}

#drhilmi-pins-overlay {
    position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* ---- PIN BASE ---- */
.drhilmi-pin {
    position: absolute !important;
    width: 14px !important;
    height: 14px !important;
    transform: translate(-50%, -50%) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 10;
}

.drhilmi-pin-inner {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--ia-primary);
    border: 2.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
    animation: blue-pulse 2.8s ease-in-out infinite;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ---- ACTIVE PIN (clicked) ---- */
.drhilmi-pin.active .drhilmi-pin-inner {
    background: var(--ia-orange) !important;
    border-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(252, 80, 0, 0.25) !important;
    animation: orange-pulse 1.4s ease-in-out infinite !important;
}

/* ---- HIGHLIGHTED PINS (filtered category) ---- */
.drhilmi-pin.highlighted .drhilmi-pin-inner {
    background: var(--ia-orange) !important;
    border-color: #fff !important;
    animation: orange-pulse 1.4s ease-in-out infinite !important;
}

/* ---- FILTERED OUT ---- */
.drhilmi-pin.filtered-out {
    display: none !important;
    pointer-events: none !important;
}

/* ---- ANIMATIONS ---- */
@keyframes blue-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4); }
    60%  { box-shadow: 0 0 0 9px rgba(0, 122, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}

@keyframes orange-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(252, 80, 0, 0.5); }
    60%  { box-shadow: 0 0 0 10px rgba(252, 80, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(252, 80, 0, 0); }
}

/* ---- SMART TOOLTIPS (desktop hover) ---- */
.drhilmi-custom-tooltip {
    position: absolute;
    background: rgba(20, 20, 22, 0.9);
    color: #fff;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 30;
}

/* Left half of image → tooltip goes LEFT */
.drhilmi-tip-left .drhilmi-custom-tooltip {
    right: 22px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
}

/* Right half of image → tooltip goes RIGHT */
.drhilmi-tip-right .drhilmi-custom-tooltip {
    left: 22px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
}

.drhilmi-pin:hover .drhilmi-custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* ============================================
   GLASS PANEL (Right Side)
   ============================================ */
.drhilmi-details-panel {
    background: var(--ia-bg) !important;
    backdrop-filter: blur(28px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
    border-radius: 24px !important;
    border: 1px solid var(--ia-border) !important;
    padding: 28px !important;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 32px rgba(0,0,0,0.07) !important;
}

/* Controls (dropdown + search) */
.drhilmi-controls-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

/* ---- CUSTOM DROPDOWN ---- */
.drhilmi-custom-dropdown { position: relative; cursor: pointer; }

.drhilmi-dropdown-selected {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: var(--ia-input-bg) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    padding: 13px 18px !important;
    font-size: 15px;
    font-weight: 500;
    color: var(--ia-text);
    transition: background 0.2s;
}

.drhilmi-arrow-icon {
    display: block !important;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--ia-text-dim);
}

.drhilmi-custom-dropdown.open .drhilmi-arrow-icon {
    transform: rotate(180deg);
}

.drhilmi-dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
    padding: 6px !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 50;
}

.drhilmi-custom-dropdown.open .drhilmi-dropdown-list { display: block !important; }

.drhilmi-dropdown-list li {
    padding: 11px 16px !important;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

.drhilmi-dropdown-list li:hover {
    background: var(--ia-primary) !important;
    color: #fff !important;
}

/* ---- SEARCH BAR ---- */
.drhilmi-search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ia-input-bg) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    padding: 0 16px !important;
}

.drhilmi-search-wrapper input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 13px 0 !important;
    font-size: 15px;
    color: var(--ia-text);
}

.drhilmi-search-wrapper input::placeholder { color: var(--ia-text-dim); }

.drhilmi-search-wrapper .dashicons {
    color: var(--ia-text-dim);
    font-size: 18px;
}

/* ---- SECTION TITLE ---- */
.drhilmi-panel-header h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--ia-text) !important;
    margin: 0 0 4px 0 !important;
}

/* ---- PROCEDURE LIST ---- */
.drhilmi-procedure-item {
    border: none !important;
    border-bottom: 1px solid var(--ia-divider) !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.drhilmi-procedure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0 !important;
    cursor: pointer;
}

.drhilmi-procedure-header h4 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--ia-text) !important;
    transition: color 0.2s;
}

.drhilmi-procedure-item:hover .drhilmi-procedure-header h4 {
    color: var(--ia-primary) !important;
}

.drhilmi-procedure-body {
    display: none;
    padding: 4px 0 16px 0;
}

.drhilmi-procedure-item.open .drhilmi-procedure-body {
    display: block !important;
}

.drhilmi-summary-text {
    font-size: 14px;
    color: var(--ia-text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.drhilmi-detail-btn {
    display: inline-block;
    color: var(--ia-primary) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 900px) {
    .drhilmi-anatomy-wrapper {
        padding: 20px 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .drhilmi-main-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .drhilmi-map-section {
        order: 1 !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .drhilmi-main-image {
        max-height: 52vh !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    /* Mobile Panel - Tam genişlik, ortalı, eşit boşluk */
    .drhilmi-details-panel {
        order: 2 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        background: #f2f2f7 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-radius: 20px !important;
        border: none !important;
        box-shadow: none !important;
        padding: 20px !important;
    }

    .drhilmi-pin {
        width: 12px !important;
        height: 12px !important;
    }

    .drhilmi-custom-tooltip { display: none !important; }
}
