/*!
 * Jalali Converter Pro v5.1.0 - Frontend & Popup DatePicker Styles
 */
.jpro-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    unicode-bidi: isolate;
}

.jpro-rel-badge {
    display: inline-block;
    font-size: 0.78em;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-weight: 600;
    vertical-align: middle;
}

.jpro-input-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    user-select: none;
    max-width: 100%;
    line-height: 1.5;
    font-family: "jalaliconverter", Vazirmatn, Tahoma, Arial, sans-serif;
}

.jpro-input-pill:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(14, 165, 233, 0.16));
    border-color: rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.jpro-input-pill .jpro-pill-btn {
    background: #4f46e5;
    color: #fff;
    border-radius: 5px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.jpro-input-pill .jpro-pill-val {
    color: #1e1b4b;
    font-weight: 700;
}

.jpro-has-picker {
    cursor: pointer !important;
}

/* Suppress overlapping Gregorian datepickers when Jalali DatePicker is active */
body.jpro-picker-active .datepicker-dropdown,
body.jpro-picker-active .daterangepicker,
body.jpro-picker-active #ui-datepicker-div,
body.jpro-picker-active .flatpickr-calendar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Interactive Popup Calendar Picker */
#jpro-popup-picker {
    position: fixed;
    z-index: 2147483000;
    width: 316px;
    max-width: calc(100vw - 20px);
    background: #ffffff;
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    direction: rtl;
    text-align: right;
    font-family: "jalaliconverter", Vazirmatn, Tahoma, Arial, sans-serif;
    overflow: hidden;
    display: none;
    color: #1e293b;
}

#jpro-popup-picker * {
    box-sizing: border-box;
}

.jpro-pk-head {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.jpro-pk-nav {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.jpro-pk-nav:hover {
    background: rgba(255, 255, 255, 0.35);
}

.jpro-pk-selects {
    display: flex;
    gap: 5px;
    align-items: center;
}

.jpro-pk-selects select {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 7px;
    padding: 3px 6px;
    font-size: 12.5px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.jpro-pk-selects select option {
    color: #0f172a;
    background: #fff;
}

.jpro-pk-range-banner {
    background: #eef2ff;
    color: #3730a3;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 12px;
    text-align: center;
    border-bottom: 1px solid #e0e7ff;
}

.jpro-pk-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 7px 8px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
}

.jpro-pk-weekdays span:last-child {
    color: #ef4444;
}

.jpro-pk-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 10px;
}

.jpro-pk-day {
    height: 34px;
    border: none;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.jpro-pk-day:hover {
    background: #e0e7ff;
    color: #4338ca;
}

.jpro-pk-day.is-friday {
    color: #ef4444;
    background: #fef2f2;
}

.jpro-pk-day.is-today {
    border: 2px solid #10b981;
    color: #047857;
    font-weight: 800;
}

.jpro-pk-day.is-selected {
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.35);
}

.jpro-pk-day.is-in-range {
    background: #e0e7ff;
    color: #3730a3;
}

.jpro-pk-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 6px;
}

.jpro-pk-foot button {
    border: none;
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.jpro-pk-btn-today {
    background: #10b981;
    color: #fff;
}

.jpro-pk-btn-clear {
    background: #e2e8f0;
    color: #334155;
}

.jpro-pk-btn-close {
    background: transparent;
    color: #64748b;
}

/* FullCalendar WHMCS System Calendar Enhancer */
.jpro-fc-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    padding: 1px 6px;
    margin-inline-start: 4px;
    font-family: "jalaliconverter", Vazirmatn, Tahoma, Arial, sans-serif;
}

.jpro-fc-badge.is-friday {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}
