/* ============================================================
   calendar.css — jQuery UI datepicker stilizacija
   Tokeni: --mc-* iz rez_form.css
   ============================================================ */

/* ── Kontejner ───────────────────────────────────────────── */
.ui-widget-content { border: none !important; }

#ui-datepicker-div { z-index: 300 !important; }

.ui-datepicker {
    font-family: inherit;
    width: 100%;
    max-width: 320px !important;
    padding: 16px !important;
    background: #fff;
    border: none !important;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
    box-sizing: border-box;
}

/* ── Centriranje (cusDp = dnevni/tedenski pogled) ────────── */
.cusDp {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
    -webkit-transform: translateX(-50%) translateY(-50%) !important;
    z-index: 9999 !important;
    margin: 0 !important;
}
.cDpLeft {
    left: calc(50vw - 160px) !important;
    transform: translateX(0) translateY(-50%) !important;
    -webkit-transform: translateX(0) translateY(-50%) !important;
}

/* ── Header (mesec + puščice) ────────────────────────────── */
.ui-datepicker-header {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1.5px solid #eef2f5 !important;
    border-radius: 0;
    padding: 4px 0 16px 0 !important;
    margin-bottom: 10px;
    display: flex;
    align-items: center !important;
    position: relative;
    height: 45px !important;
}

.ui-datepicker-title {
    flex: 1;
    text-align: center;
    height: auto !important;
    line-height: 1 !important;
    margin: 0 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ui-datepicker-month {
    font-family: inherit;
    font-size: 15px !important;
    font-weight: 700;
    color: #1b2d4f !important;
    background: transparent;
    border: none !important;
    padding: 0;
    margin: 0 !important;
    width: auto !important;
    height: auto;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.ui-datepicker-year {
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 500;
    color: #7f96a8 !important;
    background: transparent;
    border: none !important;
    padding: 0;
    margin: 0 !important;
    width: auto !important;
    height: auto;
    display: inline-block;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.ui-datepicker-month option,
.ui-datepicker-year option {
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 500;
    color: #1b2d4f !important;
    background: #fff !important;
}

/* ── Navigacijske puščice ────────────────────────────────── */
.ui-datepicker-prev,
.ui-datepicker-next {
    width: 30px !important;
    height: 30px !important;
    top: 4px !important;
    margin-top: 0 !important;
    border-radius: 50%;
    background: #f4f7fa !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    position: absolute !important;
    text-decoration: none !important;
    border: none !important;
    outline: none;
}
.ui-datepicker-prev { left: 0 !important; }
.ui-datepicker-next { right: 0 !important; }

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: #dde8ef !important;
    text-decoration: none !important;
}

/* Skrij originalne span ikone */
.ui-datepicker-prev span,
.ui-datepicker-next span { display: none !important; }

/* Font Awesome 6 chevron ikone */
.ui-datepicker-prev::after {
    content: "\f053";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: #fb5607;
    line-height: 1;
    text-decoration: none;
}
.ui-datepicker-next::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    color: #fb5607;
    line-height: 1;
    text-decoration: none;
}

/* ── Tabela dni ──────────────────────────────────────────── */
.ui-datepicker table {
    width: 100%;
    max-width: 320px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 2px;
}

.ui-datepicker thead {
    background: transparent;
}

.ui-datepicker-calendar thead tr th {
    font-family: inherit;
    font-size: 11px !important;
    font-weight: 600;
    color: #7f96a8;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 0 8px !important;
    background: transparent;
    text-align: center;
    width: auto !important;
}

.ui-datepicker td {
    width: auto;
    text-align: center;
    vertical-align: middle;
    padding: 1px;
}

/* Dan celica */
.ui-datepicker .ui-state-default {
    border: none !important;
    background: transparent !important;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    margin: 0 auto;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 500;
    color: #1b2d4f;
    line-height: 1 !important;
    transition: background .12s, color .12s;
}

/* Danes */
.ui-datepicker .ui-state-default.ui-state-highlight {
    background: #e6f7f7 !important;
    color: #009393 !important;
    font-weight: 700;
}

/* Hover */
.ui-state-default.ui-state-hover {
    background: #f4f7fa !important;
    color: #1b2d4f !important;
    border: none !important;
}

/* Izbrani datum */
.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-default.ui-state-active {
    background: #009393 !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700;
}

/* Danes + izbran */
.ui-datepicker .ui-state-highlight.ui-state-active {
    background: #009393 !important;
    color: #fff !important;
}

/* Onemogočeni dnevi */
.ui-datepicker .ui-state-disabled .ui-state-default {
    color: #c5d0d8;
    cursor: not-allowed;
}

/* ── Backdrop blur ───────────────────────────────────────── */
#dp-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 295;
    background: rgba(15,25,40,.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#dp-backdrop.active { display: block; }

/* ── Ostalo ──────────────────────────────────────────────── */
.ui-datepicker .ui-state-hover { border: none !important; }
.ui-datepicker-close { display: none; }
.ui-datepicker-current { display: none; }
.ui-datepicker-buttonpane { display: none; }
.ui-datepicker-trigger { margin: 0 0 0 5px; vertical-align: text-top; }
