﻿.hdp {
    --hdp-font-size: 12px;
    --hdp-control-height: calc(var(--hdp-font-size) * 2.45);
    --hdp-radius: calc(var(--hdp-font-size) * 0.50);
    --hdp-panel-padding-y: calc(var(--hdp-font-size) * 0.55);
    --hdp-panel-padding-x: calc(var(--hdp-font-size) * 0.65);
    --hdp-gap: calc(var(--hdp-font-size) * 0.40);
    --hdp-border-color: #8b9bb0;
    --hdp-border-hover: #6f8198;
    --hdp-panel-border: #d7dde6;
    --hdp-panel-bg: #fbfcfe;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #dce6f2;
    --hdp-gradient-bottom-hover: #cfdbeb;
}

.hdp-theme-blue {
    --hdp-border-color: #8b9bb0;
    --hdp-border-hover: #6f8198;
    --hdp-panel-border: #d7dde6;
    --hdp-panel-bg: #fbfcfe;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #dce6f2;
    --hdp-gradient-bottom-hover: #cfdbeb;
}

.hdp-theme-green {
    --hdp-border-color: #7ea58a;
    --hdp-border-hover: #5e8769;
    --hdp-panel-border: #d6e4d9;
    --hdp-panel-bg: #fbfffb;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #dcefe2;
    --hdp-gradient-bottom-hover: #cfe6d6;
}

.hdp-theme-orange {
    --hdp-border-color: #c49a61;
    --hdp-border-hover: #a77d43;
    --hdp-panel-border: #eadcc8;
    --hdp-panel-bg: #fffdf8;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #f3e4cf;
    --hdp-gradient-bottom-hover: #ead5b9;
}

.hdp-theme-purple {
    --hdp-border-color: #9886b8;
    --hdp-border-hover: #7f6aa4;
    --hdp-panel-border: #dfd8ed;
    --hdp-panel-bg: #fdfbff;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #e6ddf4;
    --hdp-gradient-bottom-hover: #d9cdec;
}

.hdp-theme-gray {
    --hdp-border-color: #929292;
    --hdp-border-hover: #707070;
    --hdp-panel-border: #d9d9d9;
    --hdp-panel-bg: #fcfcfc;
    --hdp-gradient-top: #ffffff;
    --hdp-gradient-bottom: #e6e6e6;
    --hdp-gradient-bottom-hover: #d9d9d9;
}

.hdp-layout {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--hdp-font-size) * 1.2);
    margin-bottom: 10px;
}

.hdp-layout-stack {
    flex-direction: column;
    align-items: center;
}

.hdp-layout-inline {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.hdp-block {
    display: flex;
    justify-content: center;
}

.hdp-panel {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: var(--hdp-panel-padding-y) var(--hdp-panel-padding-x);
    border: 1px solid var(--hdp-panel-border);
    border-radius: calc(var(--hdp-radius) + 1px);
    background: var(--hdp-panel-bg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
    width: auto;
}

.hdp-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--hdp-gap);
}

.hdp-hebrew-row {
    direction: rtl;
}

.hdp-gregorian-row {
    direction: ltr;
}

.hdp-button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: var(--hdp-control-height);
    border: 1px solid var(--hdp-border-color);
    border-radius: var(--hdp-radius);
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 2px 4px rgba(0,0,0,0.18);
    color: #111;
    font-size: var(--hdp-font-size);
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
    padding: 0 0.35em;
}

    .hdp-button::-ms-expand {
        display: none;
    }

    .hdp-button:hover {
        background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom-hover));
        border-color: var(--hdp-border-hover);
    }

    .hdp-button:active {
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.22), 0 1px 2px rgba(0,0,0,0.12);
        transform: translateY(1px);
    }

.hdp-day {
    width: 4.7ch;
    min-width: 4.7ch;
}

.hdp-month {
    width: 7.6ch;
    min-width: 7.6ch;
}

.hdp-year {
    width: 6.7ch;
    min-width: 6.7ch;
}

.hdp-gregorian-input {
    width: 15.2ch;
    min-width: 15.2ch;
    direction: ltr;
}

.hdp-result {
    margin-top: 10px;
    padding: 8px 10px;
    background: #f7f7f7;
    border-radius: 6px;
    line-height: 1.8;
    text-align: right;
    font-size: 14px;
}

.hdp-error {
    color: #b00020;
    margin-top: 6px;
}
.hdp-disabled .hdp-button {
    opacity: 0.65;
    cursor: not-allowed;
}

.hdp-required .hdp-panel {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 0 0 1px rgba(180, 80, 80, 0.18);
}

.hdp-time-hour {
    width: 5.2ch;
    min-width: 5.2ch;
}

.hdp-time-minute {
    width: 5.2ch;
    min-width: 5.2ch;
}

.hdp-time-separator {
    font-size: var(--hdp-font-size);
    font-weight: bold;
    padding: 0 0.2em;
    line-height: var(--hdp-control-height);
}

#scheduledDiv .col-md-3 {
    text-align: right;
}

    #scheduledDiv .col-md-3 label {
        display: block;
        min-width: 180px;
        margin-right: 20px;
        white-space: nowrap;
    }

.wa-schedule-picker-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    width: auto;
    max-width: max-content;
}

#ScheduledTimePickerWrap {
    display: inline-flex;
    width: auto;
    max-width: max-content;
}

    #ScheduledTimePickerWrap .hdp-panel {
        width: auto;
        max-width: max-content;
    }

/* ================================
   Hebrew Calendar Picker - Calendar Mode
   ================================ */

.hdp-calendar-mode {
    direction: rtl;
    display: inline-block;
    position: relative;
}

/* Closed state button */
.hdp-calendar-toggle {
    min-width: calc(var(--hdp-font-size) * 18);
    min-height: calc(var(--hdp-font-size) * 2.8);
    border: 1px solid var(--hdp-border-color);
    border-radius: var(--hdp-radius);
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 2px 4px rgba(0,0,0,0.18);
    color: #111;
    font-size: var(--hdp-font-size);
    font-weight: bold;
    cursor: pointer;
    padding: 0 calc(var(--hdp-font-size) * 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--hdp-font-size) * 0.6);
    direction: rtl;
}

    .hdp-calendar-toggle:hover {
        background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom-hover));
        border-color: var(--hdp-border-hover);
    }

.hdp-calendar-toggle-arrow {
    font-size: calc(var(--hdp-font-size) * 0.9);
}

/* Popup */
.hdp-calendar-popup {
    display: none;
    position: absolute;
    z-index: 9999;
    top: calc(var(--hdp-font-size) * 3.2);
    right: 0;
}

.hdp-calendar-open .hdp-calendar-popup {
    display: block;
}

/* Main calendar panel */
.hdp-calendar {
    width: calc(var(--hdp-font-size) * 31);
    border: 1px solid var(--hdp-panel-border);
    border-radius: calc(var(--hdp-radius) + 3px);
    background: var(--hdp-panel-bg);
    padding: calc(var(--hdp-font-size) * 0.75);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 2px 5px rgba(0,0,0,0.12);
}

/* Header */
.hdp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--hdp-font-size) * 0.5);
    margin-bottom: calc(var(--hdp-font-size) * 0.45);
}

.hdp-calendar-header-selects {
    display: flex;
    gap: calc(var(--hdp-font-size) * 0.35);
    align-items: center;
    justify-content: center;
    flex: 1;
}

.hdp-calendar-nav {
    width: calc(var(--hdp-font-size) * 2.2);
    height: calc(var(--hdp-font-size) * 2.2);
    border: 1px solid var(--hdp-border-color);
    border-radius: var(--hdp-radius);
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
    font-size: calc(var(--hdp-font-size) * 1.3);
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

    .hdp-calendar-nav:hover {
        background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom-hover));
        border-color: var(--hdp-border-hover);
    }

.hdp-calendar-year-nav {
    font-size: calc(var(--hdp-font-size) * 1.05);
}

.hdp-calendar-select {
    height: calc(var(--hdp-font-size) * 2.2);
    border: 1px solid var(--hdp-border-color);
    border-radius: var(--hdp-radius);
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
    color: #111;
    font-size: calc(var(--hdp-font-size) * 0.85);
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
    padding: 0 calc(var(--hdp-font-size) * 0.25);
}

    .hdp-calendar-select:hover {
        border-color: var(--hdp-border-hover);
    }

    .hdp-calendar-select[data-hdp-role="calendar-year-select"] {
        width: calc(var(--hdp-font-size) * 6.4);
    }

    .hdp-calendar-select[data-hdp-role="calendar-month-select"] {
        width: calc(var(--hdp-font-size) * 7.4);
    }

/* Gregorian range title */
.hdp-calendar-gregorian-range {
    text-align: center;
    font-size: calc(var(--hdp-font-size) * 0.88);
    font-weight: bold;
    color: #444;
    margin-top: calc(var(--hdp-font-size) * 0.25);
    margin-bottom: calc(var(--hdp-font-size) * 0.45);
    direction: rtl;
}

/* Weekdays */
.hdp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: calc(var(--hdp-font-size) * 0.25);
    margin-bottom: calc(var(--hdp-font-size) * 0.35);
    text-align: center;
    font-size: calc(var(--hdp-font-size) * 0.95);
    font-weight: bold;
}

/* Days grid */
.hdp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: calc(var(--hdp-font-size) * 0.25);
}

.hdp-calendar-day {
    height: calc(var(--hdp-font-size) * 4.95);
    min-height: calc(var(--hdp-font-size) * 4.95);
    max-height: calc(var(--hdp-font-size) * 4.95);
    border: 1px solid var(--hdp-panel-border);
    border-radius: var(--hdp-radius);
    background: #ffffff;
    cursor: pointer;
    color: #111;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: calc(var(--hdp-font-size) * 0.24);
    padding-right: calc(var(--hdp-font-size) * 0.18);
    padding-bottom: calc(var(--hdp-font-size) * 0.04);
    padding-left: calc(var(--hdp-font-size) * 0.18);
    overflow: hidden;
    box-sizing: border-box;
}

    .hdp-calendar-day:hover {
        border-color: var(--hdp-border-hover);
        background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom-hover));
    }

.hdp-calendar-empty {
    visibility: hidden;
    cursor: default;
}

.hdp-calendar-hebrew-day {
    display: block;
    width: 100%;
    font-size: calc(var(--hdp-font-size) * 1.00);
    line-height: calc(var(--hdp-font-size) * 1.05);
    font-weight: bold;
}

.hdp-calendar-gregorian-day {
    display: block;
    width: 100%;
    font-size: calc(var(--hdp-font-size) * 0.70);
    line-height: calc(var(--hdp-font-size) * 0.78);
    opacity: 0.78;
    white-space: nowrap;
}

/* Holiday lines */
.hdp-calendar-holiday-badge {
    display: none;
}

.hdp-calendar-holiday-lines {
    display: block;
    width: 100%;
    margin-top: calc(var(--hdp-font-size) * 0.08);
    height: calc(var(--hdp-font-size) * 2.02);
    overflow: hidden;
}

.hdp-calendar-holiday-line {
    display: block;
    width: 100%;
    font-size: calc(var(--hdp-font-size) * 0.72);
    line-height: calc(var(--hdp-font-size) * 0.94);
    font-weight: 700;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.hdp-calendar-holiday-line1:empty,
.hdp-calendar-holiday-line2:empty {
    visibility: hidden;
}

/* Day types */
.hdp-calendar-shabbat {
    background: #f7f7f7;
}

.hdp-calendar-today {
    outline: 2px solid var(--hdp-border-hover);
    outline-offset: -2px;
}

.hdp-calendar-selected {
    border-color: var(--hdp-border-hover);
    box-shadow: inset 0 0 0 2px var(--hdp-border-hover);
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
}

.hdp-calendar-holiday {
    background: #fff3f3;
    border-color: #d18b8b;
}

.hdp-calendar-erev-holiday {
    background: #fff8e8;
    border-color: #d7b46a;
}

.hdp-calendar-rosh-chodesh {
    background: #eef6ff;
    border-color: #8fb8dd;
}

.hdp-calendar-erev-rosh-chodesh {
    background: #f4f8ff;
}

.hdp-calendar-chol-hamoed {
    background: #f2fff2;
    border-color: #8fcf8f;
}

.hdp-calendar-fast {
    background: #f5f0ff;
    border-color: #aa94d6;
}

/* Disabled */
.hdp-disabled .hdp-calendar-toggle,
.hdp-disabled .hdp-calendar-day,
.hdp-disabled .hdp-calendar-nav,
.hdp-disabled .hdp-calendar-select {
    opacity: 0.65;
    cursor: not-allowed;
}

.hdp-calendar-tooltip {
    display: none;
    position: absolute;
    z-index: 10000;
    min-width: calc(var(--hdp-font-size) * 15);
    max-width: calc(var(--hdp-font-size) * 24);
    padding: calc(var(--hdp-font-size) * 0.65) calc(var(--hdp-font-size) * 0.8);
    border: 1px solid var(--hdp-border-color);
    border-radius: calc(var(--hdp-radius) + 2px);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    color: #111;
    direction: rtl;
    text-align: right;
    pointer-events: none;
}

.hdp-calendar-tooltip-visible {
    display: block;
}

.hdp-calendar-tooltip-title {
    font-size: calc(var(--hdp-font-size) * 1.0);
    font-weight: bold;
    margin-bottom: calc(var(--hdp-font-size) * 0.35);
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: calc(var(--hdp-font-size) * 0.25);
}

.hdp-calendar-tooltip-body {
    font-size: calc(var(--hdp-font-size) * 0.9);
    line-height: 1.45;
}

.hdp-calendar-mode-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: calc(var(--hdp-font-size) * 0.35);
    margin-bottom: calc(var(--hdp-font-size) * 0.55);
}

.hdp-calendar-mode-btn {
    min-width: calc(var(--hdp-font-size) * 5.2);
    height: calc(var(--hdp-font-size) * 2.05);
    border: 1px solid var(--hdp-border-color);
    border-radius: var(--hdp-radius);
    background: #ffffff;
    color: #111;
    font-size: calc(var(--hdp-font-size) * 0.82);
    font-weight: bold;
    cursor: pointer;
}

    .hdp-calendar-mode-btn:hover {
        border-color: var(--hdp-border-hover);
        background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom-hover));
    }

.hdp-calendar-mode-btn-active {
    background: linear-gradient(var(--hdp-gradient-top), var(--hdp-gradient-bottom));
    border-color: var(--hdp-border-hover);
    box-shadow: inset 0 0 0 1px var(--hdp-border-hover);
}

.hdp-calendar-select[data-hdp-role="calendar-gregorian-year-select"] {
    width: calc(var(--hdp-font-size) * 6.4);
}

.hdp-calendar-select[data-hdp-role="calendar-gregorian-month-select"] {
    width: calc(var(--hdp-font-size) * 7.8);
}