/* Farayandyar custom date and time pickers */

.fp-picker {
    position: relative;
    width: 100%;
}

.fp-picker-input {
    direction: ltr;
    text-align: left;
    cursor: pointer;
    background-color: #fff;
}

.fp-popup {
    position: absolute;
    z-index: 1055;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    width: min(330px, 95vw);
    padding: 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
    direction: rtl;
}

.fp-popup[hidden] {
    display: none !important;
}

.fp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.fp-calendar-title {
    font-weight: 700;
    font-size: .95rem;
}

.fp-nav {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 7px;
    min-width: 34px;
    height: 32px;
    cursor: pointer;
}

.fp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.fp-weekday,
.fp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 34px;
    font-size: .85rem;
}

.fp-weekday {
    color: #6c757d;
    font-weight: 700;
}

.fp-day {
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

.fp-day:hover {
    background: #e9ecef;
}

.fp-day.selected {
    background: #0d6efd;
    color: white;
}

.fp-day.today {
    outline: 1px solid #0d6efd;
}

.fp-day.outside {
    visibility: hidden;
}

.fp-time-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    direction: ltr;
    align-items: center;
    gap: 10px;
}

.fp-time-panel .fp-time-hour {
    grid-column: 1;
    grid-row: 1;
}

.fp-time-panel .fp-time-separator {
    grid-column: 2;
    grid-row: 1;
}

.fp-time-panel .fp-time-minute {
    grid-column: 3;
    grid-row: 1;
}

.fp-time-panel select {
    flex: 1;
    min-width: 0;
    height: 42px;
    direction: ltr;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 7px;
    background: white;
    padding: 5px;
}

.fp-time-separator {
    font-size: 1.2rem;
    font-weight: bold;
}

.fp-popup-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.fp-popup-footer button {
    border: 0;
    border-radius: 7px;
    background: #0d6efd;
    color: white;
    padding: 6px 14px;
    cursor: pointer;
}

[dir="rtl"] .fp-picker-input {
    direction: ltr;
    text-align: left;
}
