/* ============================================
   coin-detail.css — coin_detail.php sayfasina ozel stiller
   (Ortak stiller components.css dosyasindadir)
   1. blok: Arama, indikator, AI yorum
   2. blok: Coin baslik, grafik, blog kartlari, lightbox, TradingView
   ============================================ */

/* --- CSS Degiskenleri (coin_detail sayfasina ozel) --- */
:root {
    --primary: #6236FF;
    --text-color: #222;
}
.dark-mode {
    --primary: #6236FF;
    --text-color: #fff;
}

/* --- coin_detail sayfasina ozel arama kutusu override --- */
/* coin_detail'de arama kutusu farkli border-radius ve stil kullaniyor */
.coin-detail-search .search-box input {
    padding-right: 40px;
    border-radius: 10px;
    background-color: rgb(255, 255, 255);
    color: var(--bs-body-color);
    border: 1px solid rgba(160, 160, 160, 0.2);
    transition: all 0.3s ease;
}

.coin-detail-search .search-box input:focus {
    box-shadow: 0 0 0 3px rgba(31, 118, 255, 0.2);
    border-color: #1f76ff;
}

.coin-detail-search .search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--bs-body-color);
    opacity: 0.7;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.coin-detail-search .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgb(255, 255, 255);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(160, 160, 160, 0.2);
    border-top: none;
}

.dark-mode .coin-detail-search .search-box input {
    background-color: #1a1d21;
    border-color: #333;
    color: #fff;
}

.dark-mode .coin-detail-search .search-button {
    color: #ccc;
}

.dark-mode .coin-detail-search .search-results {
    background-color: #1a1d21;
    border-color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dark-mode .coin-detail-search .search-result-item {
    border-color: #333;
}

.dark-mode .coin-detail-search .search-result-item:hover {
    background-color: #2a2a2a;
}

.dark-mode .coin-detail-search .search-result-item span {
    color: #fff;
}

.coin-detail-search .search-result-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.coin-detail-search .search-result-item span {
    font-weight: 500;
    color: var(--bs-body-color);
}

.coin-detail-search .search-result-item .ms-auto {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
}

.coin-detail-search .search-result-item .text-success {
    color: #00B746 !important;
}

.coin-detail-search .search-result-item .text-danger {
    color: #EF403C !important;
}

/* --- Teknik Indikator Butonlari Stilleri (coin_detail versiyonu) --- */
#indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 0;
}

.indicator-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(98, 54, 255, 0.08);
    border: 1px solid rgba(98, 54, 255, 0.15);
    color: #6236FF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.dark-mode .indicator-button {
    background: rgba(98, 54, 255, 0.12);
    border-color: rgba(98, 54, 255, 0.25);
    color: #8B7EFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.indicator-button:hover {
    background: rgba(98, 54, 255, 0.15);
    border-color: rgba(98, 54, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(98, 54, 255, 0.2);
}

.dark-mode .indicator-button:hover {
    background: rgba(98, 54, 255, 0.2);
    border-color: rgba(98, 54, 255, 0.4);
    box-shadow: 0 4px 8px rgba(98, 54, 255, 0.3);
}

.indicator-button.active {
    background: linear-gradient(135deg, #6236FF, #8B7EFF);
    border-color: #6236FF;
    color: #fff;
    box-shadow: 0 4px 12px rgba(98, 54, 255, 0.3);
}

.dark-mode .indicator-button.active {
    background: linear-gradient(135deg, #7B6EFF, #9B8FFF);
    border-color: #7B6EFF;
    box-shadow: 0 4px 12px rgba(123, 110, 255, 0.4);
}

.indicator-button.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(98, 54, 255, 0.4);
}

.dark-mode .indicator-button.active:hover {
    box-shadow: 0 6px 16px rgba(123, 110, 255, 0.5);
}

.indicator-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.indicator-button:hover::before {
    left: 100%;
}

.indicator-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.indicator-button:hover .indicator-icon {
    transform: scale(1.1);
}

.indicator-button.active .indicator-icon {
    transform: scale(1.05);
}

.indicator-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Responsive tasarim */
@media (max-width: 576px) {
    #indicators {
        gap: 4px;
        padding: 10px 0;
        max-height: none;
        overflow: visible;
    }

    .indicator-button {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 15px;
        min-width: auto;
        flex-shrink: 0;
    }

    .indicator-icon {
        font-size: 12px;
    }

    .indicator-text {
        font-size: 10px;
        font-weight: 500;
    }
}

/* Ekstra kucuk ekranlar icin */
@media (max-width: 480px) {
    #indicators {
        gap: 3px;
        padding: 8px 0;
    }

    .indicator-button {
        padding: 3px 6px;
        font-size: 10px;
        gap: 4px;
    }

    .indicator-icon {
        font-size: 11px;
    }

    .indicator-text {
        font-size: 9px;
    }
}

/* Cok kucuk ekranlar icin sadece icon goster */
@media (max-width: 360px) {
    .indicator-button .indicator-text {
        display: none;
    }

    .indicator-button {
        padding: 6px;
        min-width: 32px;
        justify-content: center;
    }

    .indicator-icon {
        font-size: 14px;
    }
}

/* Pulse animasyonu aktif butonlar icin */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(98, 54, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(98, 54, 255, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(98, 54, 255, 0.3);
    }
}

.indicator-button.active.pulse {
    animation: pulse 2s infinite;
}

.dark-mode .indicator-button.active.pulse {
    animation: pulseDark 2s infinite;
}

@keyframes pulseDark {
    0% {
        box-shadow: 0 4px 12px rgba(123, 110, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(123, 110, 255, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(123, 110, 255, 0.4);
    }
}

/* --- AI Yorum Karti Stilleri --- */
.dark-mode #aiMainTitle {
    color: #fff !important;
}

#aiCommentData h6 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

#aiCommentData .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 8px;
}

#aiCommentText p {
    line-height: 1.5;
    font-size: 0.9rem;
}

/* AI yorum loading animasyonu */
.ai-loading {
    animation: aiPulse 1.5s ease-in-out infinite alternate;
}

@keyframes aiPulse {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* ================================================
   2. BLOK — Coin baslik, grafik, blog kartlari, lightbox, TradingView
   ================================================ */

/* --- Coin Baslik Stilleri --- */
.coinLogo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.coin-head {
    padding: 20px 16px;
    text-align: center;
}

.coin-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.coin-head h1.total {
    font-size: 32px;
    margin: 10px 0;
    font-weight: 700;
}

.coin-head .caption {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.coin-head .iconbox {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 5px;
}

.coin-chart-container {
    min-height: 300px;
}

.canvas-container {
    position: relative;
    height: 40vh;
    width: 100%;
    margin: 0;
    padding: 10px;
}

#rsiContainer-15m, #rsiContainer-1h, #rsiContainer-4h, #rsiContainer-1d, #rsiContainer-1w {
    position: relative;
    height: 20vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

#macdContainer-15m, #macdContainer-1h, #macdContainer-4h, #macdContainer-1d, #macdContainer-1w {
    position: relative;
    height: 20vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

.analysis-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

#aiAnalysisBtn {
    font-weight: 500;
}

#aiAnalysisBtn ion-icon {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

#aiAnalysisModal .modal-content {
    border-radius: 16px;
}

#aiAnalysisModal .modal-header {
    border-bottom: 1px solid rgba(160, 160, 160, 0.1);
    padding: 15px;
}

#aiAnalysisModal .modal-title {
    display: flex;
    align-items: center;
}

.dark-mode .iconbox.text-success {
    color: #00B746 !important;
}

.dark-mode .iconbox.text-danger {
    color: #EF403C !important;
}

/* --- TradingView Analizleri icin Stiller --- */
.blog-card {
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-card .card-body {
    padding: 15px;
}

.blog-card .card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .card-subtitle {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.blog-card .btn {
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
}

.dark-mode .blog-card {
    background-color: #2a2a2a;
}

.dark-mode .blog-card .card-subtitle {
    color: #aaa;
}

/* --- TradingView Analiz Modal Stilleri --- */
#tvAnalysisModal .modal-content {
    border-radius: 16px;
}

#tvAnalysisModal .modal-header {
    border-bottom: 1px solid rgba(160, 160, 160, 0.1);
    padding: 15px;
}

#tvAnalysisModal .modal-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}

#tvAnalysisModal .modal-footer {
    border-top: 1px solid rgba(160, 160, 160, 0.1);
    padding: 10px 15px;
}

.tv-analysis-detail {
    padding: 10px 0;
}

.tv-analysis-detail img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tv-analysis-detail img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(98, 54, 255, 0.3);
}

.author-info {
    margin: 15px 0;
}

.analysis-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--bs-body-color);
    margin-top: 15px;
    text-align: left !important;
}

.tv-analysis-detail p {
    text-align: left !important;
    margin-bottom: 1rem;
    padding: 0;
}

.tv-analysis-detail div {
    text-align: left !important;
}

.dark-mode #tvAnalysisModal .modal-content {
    background-color: #222;
}

.dark-mode .analysis-content {
    color: #ddd;
}

/* --- Image Lightbox Stilleri --- */
.image-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
}

/* Mobil icin responsive ayarlar */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 35px;
        width: 45px;
        height: 45px;
    }

    .lightbox-caption {
        width: 90%;
        font-size: 14px;
    }

    .blog-card .card-title {
        font-size: 14px;
    }

    .blog-card .card-img-top {
        height: 150px !important;
    }

    #indicators {
        gap: 5px;
    }

    .indicator-button {
        padding: 5px 10px;
    }

    .indicator-text {
        font-size: 11px;
    }
}
