.trends-section {
    margin-top: 40px;
}

.filters,
.section-title-trend,
.trends-description-trend,
.chart-section{
    background: rgb(33, 52, 72);
    padding: 20px;
    border-radius: 10px;
}


/* FILTERS */

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
}

/* CALENDAR */

#calendar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    min-height: 820px;
}



/* HEADER */

.fc .fc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.fc-toolbar-title {
    font-size: 22px;
    font-weight: 600;
}

.fc-button {
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* DAY CELL */

.fc-daygrid-day {
    position: relative;
    cursor: pointer;
}

/* EVENTS */

.fc-daygrid-event {
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
}

/* DOT SIZE */

.fc-daygrid-event .fc-event-main {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* COLORS */

.fuel-a95 .fc-event-main { background: #2563eb !important; }
.fuel-a98 .fc-event-main { background: #dc2626 !important; }
.fuel-a100 .fc-event-main { background: #7c3aed !important; }

.fuel-diesel .fc-event-main { background: #16a34a !important; }
.fuel-diesel-plus .fc-event-main { background: #868686 !important; }

.fuel-gas .fc-event-main { background: #facc15 !important; }
.fuel-methane .fc-event-main { background: #06b6d4 !important; }

/* CURSOR */

.fc,
.fc * {
    cursor: pointer;
}

/* MODAL */

.modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 25, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.25s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

#close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

#modal-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 55vh;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.modal-row .price {
    font-weight: bold;
}

.trends-description {
    max-width: 700px;
    margin: 0 auto 25px auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* LEGEND */

.legend{
    display:flex;
    justify-content:center;
    gap:20px;
    margin-bottom:15px;
    font-size:13px;
    flex-wrap:wrap;
    background: rgb(33, 52, 72);
    border-radius: 30px;
    padding: 1em;
}



.legend span{
    display:flex;
    align-items:center;
    gap:6px;
}

.legend .dot{
    width:14px;
    height:14px;
    border-radius:50%;
}

.legend .dot.fuel-a95 { background:#2563eb; }
.legend .dot.fuel-a98 { background:#dc2626; }
.legend .dot.fuel-a100 { background:#7c3aed; }
.legend .dot.fuel-diesel { background:#16a34a; }
.legend .dot.fuel-diesel-plus { background:#868686; }
.legend .dot.fuel-gas { background:#facc15; }
.legend .dot.fuel-methane { background:#06b6d4; }

/* COUNT */

.day-count{
    position:absolute;
    bottom:4px;
    left:6px;
    font-size:11px;
    opacity:0.85;
}

/* CHART */

.chart-section{
    margin-top:80px;
}


/* BUTTONS */

.chart-filters{
    display:flex;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:20px;
    background: rgb(33, 52, 72);
    border-radius: 30px;
    padding: 1em;
}

.chart-filters button{
    padding:8px 14px;
    border-radius:20px;
    border:1px solid var(--border-color);
    background:rgba(255,255,255,0.05);
    color:white;
    cursor:pointer;
    transition:0.2s;
    font-weight:500;
}

/* OUTLINE COLORS */

.chart-filters button[data-fuel="Бензин A95"]{ border-color:#2563eb; }
.chart-filters button[data-fuel="Бензин A98"]{ border-color:#dc2626; }
.chart-filters button[data-fuel="Бензин A100"]{ border-color:#7c3aed; }
.chart-filters button[data-fuel="Дизел"]{ border-color:#16a34a; }
.chart-filters button[data-fuel="Дизел премиум"]{ border-color:#868686; }
.chart-filters button[data-fuel="Пропан Бутан"]{ border-color:#facc15; }
.chart-filters button[data-fuel="Метан"]{ border-color:#06b6d4; }

/* ACTIVE */

.chart-filters button.active{
    color:white;
    border:none;
}

.chart-filters button[data-fuel="Бензин A95"].active{ background:#2563eb; }
.chart-filters button[data-fuel="Бензин A98"].active{ background:#dc2626; }
.chart-filters button[data-fuel="Бензин A100"].active{ background:#7c3aed; }
.chart-filters button[data-fuel="Дизел"].active{ background:#16a34a; }
.chart-filters button[data-fuel="Дизел премиум"].active{ background:#868686; }
.chart-filters button[data-fuel="Пропан Бутан"].active{ background:#facc15; color:black; }
.chart-filters button[data-fuel="Метан"].active{ background:#06b6d4; }

/* HOVER */

.chart-filters button:hover{
    transform:translateY(-2px);
    opacity:0.9;
}

/* CHART BOX */

.chart-container{
    height:400px;
    background:var(--card-bg);
    padding:20px;
    border-radius:16px;
    border:1px solid var(--border-color);
}

/* MOBILE */

/* ===== MOBILE FIX CALENDAR HEADER ===== */

@media (max-width:768px){

    .fc .fc-toolbar{
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .fc .fc-toolbar-chunk{
        width:100%;
        display:flex;
        justify-content: space-between;
        align-items:center;
    }

    .fc-toolbar-title{
        font-size:18px;
        line-height:1.2;
        word-break: break-word;
        max-width: 100%;
    }

    .fc-button{
        padding:6px 8px;
        font-size:12px;
    }

    #calendar{
        overflow:hidden;
    }

    .chart-description{
        margin-bottom: 25px;
    }

    .fc-daygrid-day-frame{
        padding-bottom:30px;
    }


    .fc-daygrid-event .fc-event-main{
        transform: translateY(-6px);
    }


    .day-count{
        position:absolute;
        bottom: 1px;
        left:4px;
        font-size:10px;
        background:rgba(0,0,0,0.4);
        padding:1px 4px;
        border-radius:4px;
    }

    .filters{
        flex-direction: column;
        align-items: stretch;
    }

    .filters select{
        width:100%;
    }

      .chart-container{
        height:260px;
        padding:15px;
    }
}

body.light-theme .chart-filters button{
    color: #1a1a1a;
    background: rgba(0,0,0,0.05);
}

body.light-theme .chart-filters button:hover{
    background: rgba(0,0,0,0.1);
    color: #000;
}

body.light-theme .chart-filters button.active{
    color: white;
}

/* FIX: border да е по-видим */
body.light-theme .chart-filters button{
    border-color: rgba(0,0,0,0.15);
}

.fc-daygrid-day-events {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
}

.fc-daygrid-event {
    margin: 0 !important;
    padding: 0 !important;
}

.fc-daygrid-event .fc-event-main {
    width: 10px;
    height: 10px;
}

/* ===== FILTERS IN CALENDAR ===== */

.calendar-filters{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap; /* важно */
}

/* desktop */
.calendar-filters select{
    padding:6px 10px;
    border-radius:8px;
    border:1px solid var(--border-color);
    background:var(--input-bg);
    color:var(--text-color);
    font-size:12px;
}

/* ===== MOBILE ===== */

@media (max-width:768px){

    .calendar-filters{
        flex-direction:column;
        align-items:stretch;
        width:100%;
        margin-top:8px;
    }

    .calendar-filters select{
        width:100%;
    }

    .fc .fc-toolbar{
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }

    .fc .fc-toolbar-chunk{
        width:100%;
        display:flex;
        justify-content:space-between;
        align-items:center;
        flex-wrap:wrap;
    }
}

.best-prices-section{
    margin-bottom:30px;
    background:linear-gradient(135deg, #1f2937, #213448);
    padding:20px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,0.08);
}

.best-prices-section h3{
    margin-bottom:15px;
    font-size:18px;
}

/* ===== BEST PRICES SECTION ===== */

.best-prices-section{
    margin-bottom:30px;
    padding:20px;
    border-radius:16px;
    background:linear-gradient(135deg, #1f2937, #213448);
    border:1px solid rgba(255,255,255,0.08);
    box-shadow:0 10px 25px rgba(0,0,0,0.3);
    position:relative;
    overflow:hidden;
}

/* subtle animated glow */
.best-prices-section::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
    opacity:0;
    transition:0.6s;
}

.best-prices-section:hover::before{
    opacity:1;
}

/* title */

.best-prices-section h3{
    margin-bottom:15px;
    font-size:18px;
    font-weight:600;
}

/* LIST */

.best-prices-list{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
}

/* CARD */

.best-price-card{
    flex:1 1 160px;
    background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:14px;
    padding:14px;
    text-align:center;
    position:relative;
    overflow:hidden;
    transition:all 0.25s ease;
}

/* 🔥 hover interaction */

.best-price-card:hover{
    transform:translateY(-6px) scale(1.02);
    box-shadow:0 15px 30px rgba(0,0,0,0.4);
    border-color:rgba(255,255,255,0.2);
}

/* glow line on hover */

.best-price-card::after{
    content:"";
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transition:0.6s;
}

.best-price-card:hover::after{
    left:100%;
}

/* fuel */

.best-price-card .fuel{
    font-size:13px;
    opacity:0.75;
    margin-bottom:6px;
}

/* price (pulse effect) */

.best-price-card .price{
    font-size:22px;
    font-weight:700;
    margin-bottom:6px;
    transition:0.2s;
}

.best-price-card:hover .price{
    transform:scale(1.1);
}

/* station */

.best-price-card .station{
    font-size:13px;
    font-weight:500;
}

/* city */

.best-price-card .city{
    font-size:12px;
    opacity:0.6;
}

/* empty */

.best-prices-list .empty{
    opacity:0.6;
    text-align:center;
    padding:10px;
}

/* ===== ANIMATION ON LOAD ===== */

.best-price-card{
    opacity:0;
    transform:translateY(10px);
    animation:fadeInUp 0.4s ease forwards;
}

.best-price-card:nth-child(1){ animation-delay:0.05s; }
.best-price-card:nth-child(2){ animation-delay:0.1s; }
.best-price-card:nth-child(3){ animation-delay:0.15s; }
.best-price-card:nth-child(4){ animation-delay:0.2s; }
.best-price-card:nth-child(5){ animation-delay:0.25s; }

@keyframes fadeInUp{
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* ===== MOBILE ===== */

@media (max-width:768px){

    .best-prices-section{
        padding:15px;
    }

    .best-price-card{
        flex:1 1 100%;
    }

    .best-price-card .price{
        font-size:18px;
    }
}

/* ONLINE DOT */

.best-prices-section h3{
    display:flex;
    align-items:center;
    gap:10px;
}

.best-prices-section h3::after{
    content:"";
    width:10px;
    height:10px;
    border-radius:50%;
    background:#22c55e;
    box-shadow:0 0 8px #22c55e;
    animation:pulseDot 1.5s infinite;
}

/* пулсиращ ефект */

@keyframes pulseDot{
    0%{
        transform:scale(1);
        box-shadow:0 0 6px #22c55e;
    }
    50%{
        transform:scale(1.4);
        box-shadow:0 0 12px #22c55e;
    }
    100%{
        transform:scale(1);
        box-shadow:0 0 6px #22c55e;
    }
}