/* Mansur Custom Calendar UI */

#mnCalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: none;
    padding: 20px;
}

#mnCalOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mn-cal-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: none;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#mnCalOverlay.active .mn-cal-modal {
    transform: translateY(0);
}

.mn-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.mn-cal-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
}

.mn-cal-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: none;
}

.mn-cal-nav:active {
    background: #e2e8f0;
    transform: scale(0.95);
}

.mn-cal-nav svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mn-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 12px 16px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
}

.mn-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 0 16px 16px;
}

.mn-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    border-radius: 50%;
    cursor: pointer;
    transition: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mn-cal-day:not(.empty):active {
    transform: scale(0.9);
}

.mn-cal-day.empty {
    pointer-events: none;
}

.mn-cal-day.today {
    color: #0ea5e9;
    font-weight: 900;
}

.mn-cal-day.today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: #0ea5e9;
    border-radius: 50%;
}

.mn-cal-day.selected {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.mn-cal-day.selected::after {
    display: none;
}

.mn-cal-footer {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    gap: 12px;
}

.mn-cal-btn-clear, .mn-cal-btn-today {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mn-cal-btn-clear {
    background: #f1f5f9;
    color: #64748b;
}

.mn-cal-btn-clear:active {
    background: #e2e8f0;
}

.mn-cal-btn-today {
    background: #0ea5e9;
    color: #ffffff;
}

.mn-cal-btn-today:active {
    background: #0284c7;
}
