/* meteo-kalendar.css — Стилови за месечен календар */

.kalendar-wrap {
    max-width: 760px;
}

/* ── Search box (исто како другите страници) ── */
.search-box-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 20px;
    padding: 0 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 14px 18px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within {
    border-color: #29B6F6;
    box-shadow: 0 0 0 3px rgba(41,182,246,0.15);
}

.search-icon { font-size: 20px; flex-shrink: 0; opacity: .7; }

.search-input {
    flex: 1;
    background: none; border: none; outline: none;
    font-size: 17px; font-weight: 600; color: #fff;
    font-family: 'Nunito', Arial, sans-serif;
    caret-color: #29B6F6;
}
.search-input::placeholder { color: rgba(255,255,255,0.38); font-weight: 400; }

.search-clear {
    background: rgba(255,255,255,0.12); border: none;
    color: rgba(255,255,255,0.6);
    width: 26px; height: 26px; border-radius: 50%;
    cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s ease;
}
.search-clear:hover { background: rgba(255,255,255,0.22); }

.search-results {
    position: absolute;
    top: calc(100% + 6px); left: 16px; right: 16px;
    background: #0B1F35;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px; overflow: hidden; z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    max-height: 360px; overflow-y: auto;
}

.search-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background .15s ease; outline: none;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item:focus { background: rgba(41,182,246,0.12); }

.sr-icon { font-size: 18px; flex-shrink: 0; }
.sr-name { font-size: 14px; font-weight: 700; color: #fff; flex: 1; }
.sr-opstina {
    font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 600;
    background: rgba(255,255,255,0.07); border-radius: 20px; padding: 2px 9px;
    white-space: nowrap;
}
.sr-arrow { font-size: 18px; color: rgba(255,255,255,0.25); flex-shrink: 0; }

.search-state { text-align: center; padding: 28px 16px; color: rgba(255,255,255,0.45); }
.search-state-icon { font-size: 44px; margin-bottom: 10px; line-height: 1; }
.search-state p { font-size: 14px; font-weight: 600; line-height: 1.5; }

/* ── Контроли за месец/година ── */
.kal-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 16px 16px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
}

.kal-city-label {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.kal-selectors { display: flex; gap: 8px; }

.kal-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    padding: 8px 12px;
    font-family: 'Nunito', Arial, sans-serif;
    cursor: pointer;
}
.kal-select option { background: #0B1F35; color: #fff; }

/* ── Календар grid ── */
#kal-calendar { padding: 0 16px; }

.kal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.kal-weekday {
    text-align: center;
    font-size: 10.5px;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 0;
}

.kal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

.kal-day {
    aspect-ratio: 1;
    border-radius: 10px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}

.kal-day-empty { background: none; border: none; }

.kal-day-actual {
    background: rgba(255,255,255,0.07);
}

.kal-day-forecast {
    background: rgba(41,182,246,0.08);
    border-color: rgba(41,182,246,0.25);
    border-style: dashed;
}

.kal-day-num {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    margin-bottom: 2px;
}

.kal-day-icon {
    font-size: 16px;
    line-height: 1;
    margin-bottom: 2px;
}

.kal-day-temps {
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.kal-day-max { color: #FFA726; }
.kal-day-min { color: #42A5F5; margin-left: 2px; }

.kal-day-prec {
    font-size: 8px;
    color: #29B6F6;
    margin-top: 1px;
}

/* ── Легенда ── */
.kal-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 18px 16px 0;
    font-size: 11.5px;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
}

.kal-leg-item { display: flex; align-items: center; gap: 6px; }

.kal-leg-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
}
.kal-leg-actual { background: rgba(255,255,255,0.3); }
.kal-leg-forecast {
    background: rgba(41,182,246,0.4);
    border: 1px dashed rgba(41,182,246,0.6);
}

.page-meteo-kalendar main {
    min-height: calc(100vh - 58px);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .search-input { font-size: 16px; }
    .kal-controls { padding: 12px 14px; }
    .kal-day { padding: 4px 2px; border-radius: 8px; }
    .kal-day-icon { font-size: 13px; }
    .kal-day-temps { font-size: 9px; }
    .kal-day-num { font-size: 9px; }
    .kal-day-prec { display: none; }
}

@media (max-width: 480px) {
    .kal-day {
        aspect-ratio: auto;
        min-height: 56px;
        padding: 4px 2px;
        border-radius: 8px;
    }
}