/* TC Jalali Datepicker - minimal, RTL friendly */

.tc-pd {
    font-family: inherit;
    direction: rtl;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 8px 10px 10px;
    min-width: 260px;
    max-width: 320px;
    box-sizing: border-box;
}

.tc-pd * {
    box-sizing: border-box;
}

.tc-pd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 4px;
}

.tc-pd-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.tc-pd-month {
    font-size: 14px;
}

.tc-pd-year {
    font-size: 13px;
    color: #6b7280;
}

.tc-pd-nav {
    border: none;
    background: #f3f4f6;
    color: #374151;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}

.tc-pd-nav:hover {
    background: #e5e7eb;
}

.tc-pd-nav:active {
    transform: scale(0.96);
}

.tc-pd-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
    padding-inline: 2px;
}

.tc-pd-weekday {
    padding: 4px 0;
}

.tc-pd-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.tc-pd-day {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-pd-day.empty {
    height: 32px;
}

.tc-pd-day-btn {
    width: 100%;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #111827;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.tc-pd-day-btn:hover {
    background: #e5e7eb;
}

.tc-pd-day-btn:active {
    transform: scale(0.95);
}

/* Today ring */
.tc-pd-day.is-today .tc-pd-day-btn {
    border: 1px solid #3b82f6;
    padding: 0 1px;
}

/* Selected pill */
.tc-pd-day.is-selected .tc-pd-day-btn {
    background: #3b82f6;
    color: #ffffff;
}

/* Footer buttons */
.tc-pd-footer {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    border-top: 1px solid #e5e7eb;
    padding-top: 6px;
    margin-top: 2px;
}

.tc-pd-btn {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 12px;
    padding: 5px 0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.tc-pd-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.tc-pd-btn:active {
    transform: scale(0.97);
}

/* Today button accent */
.tc-pd-today {
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Small screens: show datepicker as centered modal with backdrop */
@media (max-width: 768px) {
    .tc-pd {
        /* override inline absolute positioning from plugin */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;

        /* modal sizing */
        width: calc(100vw - 32px);
        max-width: 360px;
        min-width: auto;

        z-index: 10000; /* above everything */
        border-radius: 12px;
    }



    .tc-pd-day-btn {
        font-size: 11px;
        height: 28px;
    }
}

