/* PietroCal DatePicker global — 7S5 */
.pc-date-field {
    position: relative;
    width: 100%;
}

.pc-date-native {
    position: absolute !important;
    inset: auto auto 0 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.pc-date-native::-webkit-calendar-picker-indicator {
    display: none !important;
}

.pc-date-control {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid rgba(148, 163, 184, .38);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
    color: #111827;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

.pc-date-control:hover:not(:disabled),
.pc-date-control:focus-visible,
.pc-date-control.is-open {
    border-color: rgba(233, 145, 56, .66);
    box-shadow: 0 0 0 4px rgba(233, 145, 56, .12), 0 14px 34px rgba(15, 23, 42, .075);
    outline: 0;
}

.pc-date-control:active:not(:disabled) {
    transform: translateY(1px);
}

.pc-date-control:disabled {
    cursor: not-allowed;
    opacity: .58;
    box-shadow: none;
}

.pc-date-control-icon {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(233, 145, 56, .12);
    color: #b45309;
}

.pc-date-control-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pc-date-control-main {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.pc-date-control-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -.01em;
}

.pc-date-control:not(.has-value) .pc-date-control-value {
    color: #667085;
    font-weight: 750;
}

.pc-date-control-hint {
    min-height: 15px;
    color: #8a94a6;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-date-control-chevron {
    color: #98a2b3;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform .16s ease;
}

.pc-date-control.is-open .pc-date-control-chevron {
    transform: rotate(180deg) translateY(1px);
}

.pc-datepicker-popover {
    position: absolute;
    z-index: 13080;
    width: 340px;
    max-width: calc(100vw - 32px);
    outline: none;
}


/* 7S5b: el modal de eventos usa z-index 12000; el datepicker debe quedar por encima. */
body.pietro-event-modal-open .pc-datepicker-popover {
    z-index: 13080;
}

.pc-datepicker-card {
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(233, 145, 56, .18), transparent 16rem),
        #ffffff;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .18);
    padding: 14px;
    overflow: visible;
}

.pc-datepicker-header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pc-datepicker-title {
    min-width: 0;
    text-align: center;
    display: grid;
    gap: 2px;
}

.pc-datepicker-title strong {
    color: #101828;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: -.02em;
}

.pc-datepicker-title span {
    color: #667085;
    font-size: 11px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-datepicker-nav,
.pc-datepicker-quick {
    border: 1px solid rgba(226, 232, 240, .92);
    background: rgba(255,255,255,.9);
    color: #475467;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pc-datepicker-nav {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    font-size: 24px;
    line-height: 1;
}

.pc-datepicker-nav:hover,
.pc-datepicker-quick:hover:not(:disabled),
.pc-datepicker-nav:focus-visible,
.pc-datepicker-quick:focus-visible {
    outline: 0;
    color: #b45309;
    border-color: rgba(233, 145, 56, .42);
    background: rgba(233, 145, 56, .09);
    box-shadow: 0 0 0 4px rgba(233, 145, 56, .1);
}

.pc-datepicker-weekdays,
.pc-datepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.pc-datepicker-weekdays {
    margin-bottom: 6px;
}

.pc-datepicker-weekdays span {
    color: #8a94a6;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pc-datepicker-day {
    position: relative;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    isolation: isolate;
    transition: background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.pc-datepicker-day span {
    position: relative;
    z-index: 2;
}

.pc-datepicker-day:hover:not(:disabled),
.pc-datepicker-day:focus-visible {
    outline: 0;
    background: rgba(233, 145, 56, .12);
    color: #92400e;
    box-shadow: inset 0 0 0 1px rgba(233, 145, 56, .28);
}

.pc-datepicker-day.is-outside {
    color: #b8c0cc;
}

.pc-datepicker-day.is-today:not(.is-selected)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #e99138;
    transform: translateX(-50%);
}

.pc-datepicker-day.is-in-range {
    background: rgba(233, 145, 56, .12);
    color: #92400e;
}

.pc-datepicker-day.is-range-start,
.pc-datepicker-day.is-range-end,
.pc-datepicker-day.is-selected {
    color: #ffffff;
    background: linear-gradient(135deg, #e99138, #c76c16);
    box-shadow: 0 10px 24px rgba(199, 108, 22, .26);
}

.pc-datepicker-day:disabled {
    color: #d0d5dd;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

.pc-datepicker-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, .82);
}

.pc-datepicker-quick {
    min-height: 36px;
    border-radius: 13px;
    padding: 0 13px;
    font-size: 12px;
}

.pc-datepicker-quick:disabled {
    opacity: .48;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .pc-datepicker-popover {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        width: auto;
        max-width: none;
        z-index: 13080;
    }

    .pc-datepicker-card {
        border-radius: 26px;
        padding: 16px;
        box-shadow: 0 24px 90px rgba(15, 23, 42, .28);
    }

    .pc-datepicker-day {
        border-radius: 15px;
        font-size: 14px;
    }
}

/* 7S5g: campos de fecha compactos y alineados dentro del modal de evento. */
.pc-date-control-hint {
    display: none !important;
}

#pietroEventModal .pc-date-control {
    min-height: 34px !important;
    height: 34px !important;
    grid-template-columns: 26px minmax(0, 1fr) 18px !important;
    gap: 8px !important;
    padding: 5px 9px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

#pietroEventModal .pc-date-control-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 10px !important;
}

#pietroEventModal .pc-date-control-icon svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 1.75 !important;
}

#pietroEventModal .pc-date-control-main {
    display: block !important;
    min-width: 0 !important;
}

#pietroEventModal .pc-date-control-value {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    letter-spacing: -.01em !important;
}

#pietroEventModal .pc-date-control-chevron {
    font-size: 14px !important;
    transform: translateY(0) !important;
}

#pietroEventModal .pc-date-control.is-open .pc-date-control-chevron {
    transform: rotate(180deg) !important;
}


/* 7S5i disabled days clearer */
.pc-datepicker-day:disabled {
    color: rgba(152, 162, 179, .55);
    background: rgba(248, 250, 252, .72);
    cursor: not-allowed;
    opacity: .68;
}
