/**
 * BuildTürk GW2 Tooltip Sistemi
 *
 * Guild Wars 2 oyun içi bilgi pencerelerini taklit eden
 * hover/touch tooltip sistemi.
 */

/* Tooltip katmanı */
.bt-tooltip-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
}

/* Ana tooltip kutusu - Orijinal Armory Embeds Türkçeleştirildiği için ikinci kutu gizlenmiştir */
.bt-tooltip {
    display: none !important;
    position: fixed;
    z-index: 100001;
    max-width: 380px;
    min-width: 280px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16162b 100%);
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(163, 53, 238, 0.15);
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    overflow: hidden;
}

.bt-tooltip.visible {
    opacity: 1;
}

/* Tooltip başlık */
.bt-tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #2d2d4a;
    background: rgba(163, 53, 238, 0.08);
}

.bt-tooltip-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid #555;
    flex-shrink: 0;
    background: #111;
    image-rendering: pixelated;
}

.bt-tooltip-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.bt-tooltip-subtitle {
    font-size: 11px;
    color: #aaa;
    margin: 2px 0 0;
}

/* Tooltip içerik */
.bt-tooltip-body {
    padding: 10px 12px;
}

.bt-tooltip-description {
    color: #ccc;
    margin-bottom: 8px;
}

.bt-tooltip-facts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bt-tooltip-fact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    color: #b0b0b0;
}

.bt-tooltip-fact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bt-tooltip-fact-value {
    color: #7fc97f;
    font-weight: 600;
}

/* Cooldown ve maliyet */
.bt-tooltip-meta {
    display: flex;
    gap: 16px;
    padding: 8px 12px;
    border-top: 1px solid #2d2d4a;
    font-size: 12px;
    color: #aaa;
}

.bt-tooltip-cooldown {
    color: #ffcc00;
}

.bt-tooltip-cost {
    color: #62c5e6;
}

/* Nadirlik renkleri */
.bt-rarity-junk     { color: #aaaaaa; }
.bt-rarity-basic    { color: #ffffff; }
.bt-rarity-fine     { color: #62a4da; }
.bt-rarity-masterwork { color: #1a9306; }
.bt-rarity-rare     { color: #fcd00b; }
.bt-rarity-exotic   { color: #ffa405; }
.bt-rarity-ascended { color: #fb3e8d; }
.bt-rarity-legendary { color: #4c139d; }

/* İkon renkleri (nadirlik çerçevesi) */
.bt-tooltip-icon.rarity-fine      { border-color: #62a4da; }
.bt-tooltip-icon.rarity-masterwork { border-color: #1a9306; }
.bt-tooltip-icon.rarity-rare      { border-color: #fcd00b; }
.bt-tooltip-icon.rarity-exotic    { border-color: #ffa405; }
.bt-tooltip-icon.rarity-ascended  { border-color: #fb3e8d; }
.bt-tooltip-icon.rarity-legendary { border-color: #4c139d; }

/* Stat bonusları */
.bt-tooltip-stats {
    padding: 6px 12px;
    border-top: 1px solid #2d2d4a;
}

.bt-tooltip-stat {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 12px;
}

.bt-tooltip-stat-name {
    color: #b0b0b0;
}

.bt-tooltip-stat-value {
    color: #7fc97f;
    font-weight: 600;
}

/* Tooltip tetikleyici (inline) */
.bt-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: help;
    position: relative;
}

.bt-trigger-icon {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    border: 1px solid #555;
    vertical-align: middle;
    image-rendering: auto;
}

.bt-trigger-name {
    color: #A335EE;
    text-decoration: none;
    border-bottom: 1px dotted rgba(163, 53, 238, 0.4);
}

.bt-trigger-name:hover {
    color: #c56cf0;
}

/* Eksik veri göstergesi */
.bt-tooltip-missing {
    padding: 10px 12px;
    color: #ff6b6b;
    font-style: italic;
    font-size: 12px;
}

/* Yükleniyor göstergesi */
.bt-tooltip-loading {
    padding: 20px;
    text-align: center;
    color: #888;
}

.bt-tooltip-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #555;
    border-top-color: #A335EE;
    border-radius: 50%;
    animation: bt-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* Mobil tooltip */
@media (max-width: 768px) {
    .bt-tooltip {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 50vh;
        overflow-y: auto;
    }
}
