/* ============================================================
   Apartman Kalendar v2.0 – CSS
   ============================================================ */

.apt-kal-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    margin: 1.5rem 0;
    color: #222;
}

.apt-kal-loading {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

/* Zaglavlje */
.apt-kal-header {
    margin-bottom: 1rem;
}
.apt-kal-naziv {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px 0;
}
.apt-kal-info {
    font-size: 13px;
    color: #666;
}

/* Legenda */
.apt-kal-legenda {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: 13px;
    color: #444;
    align-items: center;
}
.apt-kal-legenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.apt-kal-legenda-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Mreža mjeseci */
.apt-kal-months {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}
.apt-kal-month-block {
    min-width: 0;
}
.apt-kal-month-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kalendarska mreža 7 stupaca */
.apt-kal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.apt-kal-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    padding: 4px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.apt-kal-day {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 1px solid transparent;
    cursor: default;
    transition: opacity 0.1s;
    position: relative;
}

/* --- BOJE --- */

/* Slobodan: zelena */
.apt-kal-day.slobodan {
    background: #d4edda;
    border-color: #b8dfc4;
    color: #1a5c2a;
    font-weight: 500;
}
.apt-kal-day.slobodan.vikend {
    background: #c3e6cb;
    border-color: #a8d5b5;
}

/* Zauzeto (confirmed): crvena */
.apt-kal-day.zauzet-confirmed {
    background: #f8d7da;
    border-color: #f1aeb5;
    color: #842029;
    font-weight: 500;
}

/* Na upitu (pending): žuta */
.apt-kal-day.zauzet-pending {
    background: #fff3cd;
    border-color: #ffe69c;
    color: #7a5c00;
    font-weight: 500;
}

/* Prošli dani: siva, izblijedjela */
.apt-kal-day.proslo {
    background: #f5f5f5;
    border-color: #eee;
    color: #ccc;
    font-weight: 400;
}

/* Prazna ćelija (offset) */
.apt-kal-day.empty {
    background: transparent;
    border-color: transparent;
}

/* Danas: naglašen rub */
.apt-kal-day.danas {
    outline: 2px solid #0073aa;
    outline-offset: -1px;
    font-weight: 700;
}

/* Greška */
.apt-kal-error {
    color: #842029;
    padding: 1rem;
    background: #f8d7da;
    border-radius: 6px;
    border: 1px solid #f1aeb5;
    font-size: 13px;
}

/* ============================================================
   Responzivnost
   ============================================================ */
@media (max-width: 540px) {
    .apt-kal-day {
        font-size: 11px;
        border-radius: 4px;
    }
    .apt-kal-months {
        grid-template-columns: 1fr;
    }
    .apt-kal-month-title {
        font-size: 14px;
    }
}
