/* ============================================
   formasyon.css — formasyon.php sayfasina ozel stiller
   (Ortak stiller components.css dosyasindadir)
   ============================================ */

/* --- Formasyon Grid ve Kart --- */
.formation-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.formation-card { flex: 1 1 calc(50% - 12px); max-width: calc(50% - 12px); }
@media (max-width: 767px) {
    .formation-card { flex: 1 1 100%; max-width: 100%; }
}
@media (min-width: 992px) { .formation-card { flex: 1 1 calc(25% - 12px); max-width: calc(25% - 12px); } }
.formation-card .card-body { padding: 12px; }
.formation-header { display: flex; align-items: center; justify-content: space-between; }
.formation-title { font-weight: 600; font-size: 14px; }
.formation-sub { font-size: 12px; color: #888; }

/* --- Sayfa Ust Basligi --- */
.page-header { margin-bottom: 6px; }
.page-header-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; }
.page-title { font-weight: 600; font-size: 15px; color: #e5e7eb; }
.page-desc { font-size: 12px; color: #888; margin-top: 2px; }
.page-subtitle { font-size: 12px; color: #888; text-align: right; }
@media (max-width: 767px) { .page-header-grid { grid-template-columns: 1fr; } .page-subtitle { text-align: left; margin-top: 4px; } }

.formation-filter { margin-top: 8px; }

/* --- Grafik Konteyner --- */
.chart-container { height: 200px; position: relative; display: flex; flex-direction: column; overflow: hidden; }

/* --- Interaktif Grafik Overlay --- */
.chart-interact-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20; display: none;
    border-radius: 8px;
    transition: opacity 0.25s ease;
}
.chart-interact-overlay.visible { display: flex; align-items: center; justify-content: center; }
.chart-interact-overlay .interact-content {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    pointer-events: none; user-select: none;
}
.chart-interact-overlay .interact-icon {
    font-size: 32px; color: rgba(255,255,255,0.9);
    animation: interactPulse 2s ease-in-out infinite;
}
@keyframes interactPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.12); opacity: 1; }
}
.chart-interact-overlay .interact-text {
    font-size: 12px; color: rgba(255,255,255,0.88);
    text-align: center; font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    line-height: 1.4; padding: 0 12px;
}
.chart-interact-overlay .interact-close {
    position: absolute; top: 6px; right: 8px;
    background: rgba(255,255,255,0.15); border: none;
    color: #fff; font-size: 18px; line-height: 1;
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
    z-index: 22;
}
.chart-interact-overlay .interact-close:hover { background: rgba(255,255,255,0.3); }

/* Dark mode overlay */
.dark-mode .chart-interact-overlay { background: rgba(0, 0, 0, 0.65); }

/* --- Interaktif mod aktifken container stili --- */
.chart-container.interactive { cursor: grab; }
.chart-container.interactive.dragging { cursor: grabbing; }
.chart-container.interactive canvas { pointer-events: auto; }

/* --- Aktif modda kapatma butonu --- */
.chart-interact-close-active {
    position: absolute; top: 4px; right: 6px;
    background: rgba(0,0,0,0.35); border: none;
    color: #fff; font-size: 14px; line-height: 1;
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; display: none; align-items: center; justify-content: center;
    z-index: 21; transition: background 0.2s ease;
}
.chart-interact-close-active:hover { background: rgba(0,0,0,0.55); }
.dark-mode .chart-interact-close-active { background: rgba(255,255,255,0.15); }
.dark-mode .chart-interact-close-active:hover { background: rgba(255,255,255,0.3); }
.chart-container.interactive .chart-interact-close-active { display: flex; }
.chart-container canvas { width: 100%; display: block; }

/* --- Subchart Stilleri --- */
.subchart { position: relative; }
.subchart.rsi { height: 80px; flex: 0 0 80px; }
.subchart.price { height: 120px; flex: 0 0 120px; }
.coin-logo { width: 22px; height: 22px; border-radius: 50%; margin-right: 8px; }
.badge-tf { font-size: 12px; }

/* --- Filtre Butonlari --- */
.formation-filter .filter-btn.active { background-color: #3b82f6; color: #fff; border-color: #3b82f6; }

/* --- formasyon.php sayfasina ozel arama override --- */
/* formasyon.php'de arama kutusu boyutu farkli */
.formasyon-search .search-box input {
    padding-right: 50px;
    height: 50px;
    border-radius: 16px;
}
.formasyon-search .search-box input::placeholder {
    color: #6b7280;
}
.dark-mode .formasyon-search .search-box input::placeholder {
    color: #b0b0b0;
}
.formasyon-search .search-box .form-control {
    padding-right: 50px;
    height: 50px;
}
.formasyon-search .search-button {
    width: 50px;
    height: 50px;
}

/* --- Formasyon Arama Sonuclari --- */
#formationSearchResults {
    position: absolute;
    top: calc(100% - 8px);
    left: 15px;
    right: 15px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
}
.dark-mode #formationSearchResults {
    background-color: #1D1D1D !important;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* formasyon.php'deki arama sonuc ogesi farkli (img+span) */
.formasyon-search .search-result-item {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.formasyon-search .search-result-item:last-child {
    border-bottom: none;
}
.formasyon-search .search-result-item:hover {
    background-color: rgba(98, 54, 255, 0.08) !important;
}
.dark-mode .formasyon-search .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    background-color: #1D1D1D !important;
}
.dark-mode .formasyon-search .search-result-item:hover {
    background-color: rgba(98, 54, 255, 0.15);
}
.formasyon-search .search-result-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
.formasyon-search .search-result-item span {
    font-weight: 500;
}

/* --- Bilgilendirme Karti --- */
.info-card { margin-bottom: 10px; }
.info-toggle { cursor: pointer; }
.info-toggle ion-icon { font-size: 1.2rem; transition: transform 0.2s ease; }
/* Kapaliyken oku saga cevir */
.info-toggle.collapsed ion-icon { transform: rotate(-90deg); }

/* Demo grafikleri kaldirildi: yalnizca metin gosterilecek */
.info-demo-wrap { display: none !important; }
.info-demo-canvas { display: none !important; }
.info-demo-canvas-rsi { display: none !important; }
