/**
 * Persian Datepicker Styles for WHMCS
 * Modern RTL calendar popup styling.
 */

.whmcs-pdatepicker-container {
    position: absolute;
    display: none;
    z-index: 999999;
    width: 290px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", Tahoma, sans-serif;
    font-size: 13px;
    color: #1e293b;
    user-select: none;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.whmcs-pdatepicker-container.open {
    display: block;
    animation: pdatepickerFadeIn 0.15s ease-out;
}

@keyframes pdatepickerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.whmcs-pdatepicker-title {
    display: flex;
    gap: 6px;
    align-items: center;
}

.whmcs-pdatepicker-month-select,
.whmcs-pdatepicker-year-select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
}

.whmcs-pdatepicker-month-select:focus,
.whmcs-pdatepicker-year-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.whmcs-pdatepicker-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.whmcs-pdatepicker-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.whmcs-pdatepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 8px 0 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.whmcs-pdatepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.whmcs-pdatepicker-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.whmcs-pdatepicker-cell.empty {
    cursor: default;
}

.whmcs-pdatepicker-cell.day:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.whmcs-pdatepicker-cell.day.today {
    border: 1px solid #3b82f6;
    color: #2563eb;
    font-weight: 600;
}

.whmcs-pdatepicker-cell.day.selected {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600;
}

.whmcs-pdatepicker-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.whmcs-pdatepicker-today-btn,
.whmcs-pdatepicker-clear-btn {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.whmcs-pdatepicker-today-btn {
    color: #2563eb;
    font-weight: 600;
}

.whmcs-pdatepicker-today-btn:hover {
    background: #eff6ff;
}

.whmcs-pdatepicker-clear-btn {
    color: #ef4444;
}

.whmcs-pdatepicker-clear-btn:hover {
    background: #fef2f2;
}

/* Tooltip badge for dates in tables */
.whmcs-pdate-badge {
    cursor: help;
    border-bottom: 1px dotted #94a3b8;
    transition: color 0.15s;
}

.whmcs-pdate-badge:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
