/* ==========================================
   WOOQER DATE PICKER - Reusable Date/Time Picker Library
   ========================================== */

/* Ensure Lato is available (host pages usually have it, but fallback) */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;600;700&display=swap');

/* ------------------------------------------
   POPOVER
------------------------------------------ */
.wq-dp-popover {
    position: absolute;
    background: #FFFFFF;
    border-radius: 4px;
    padding: 12px 24px 24px 24px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16), 0 4px 8px rgba(16, 24, 40, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 336px;
    box-sizing: border-box;
    z-index: 99998;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}
.wq-dp-popover.wq-dp-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ------------------------------------------
   TITLE ROW (optional)
------------------------------------------ */
.wq-dp-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 35px;
    padding: 8px 0;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: #3D3D3D;
    white-space: nowrap;
}
.wq-dp-title {
    margin: 0;
    font-weight: 700;
    color: #3D3D3D;
}
.wq-dp-done-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #4F66E4;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.48px;
    line-height: normal;
    cursor: pointer;
}
.wq-dp-done-btn:hover {
    opacity: 0.85;
}
.wq-dp-done-btn:disabled {
    color: #C2C2C2;
    cursor: not-allowed;
}

/* ------------------------------------------
   HEADER (Month/Year + navigation)
------------------------------------------ */
.wq-dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.wq-dp-month-year {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    color: #1F1F1F;
}
.wq-dp-month-year .wq-dp-my-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    transition: transform 150ms ease;
}
.wq-dp-month-year.open .wq-dp-my-chevron {
    transform: rotate(180deg);
}
.wq-dp-nav {
    display: flex;
    gap: 14px;
    align-items: center;
}
.wq-dp-nav-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #1F1F1F;
}
.wq-dp-nav-btn:hover {
    background: #F5F5F5;
    border-radius: 4px;
}
.wq-dp-nav-btn:disabled {
    color: #C2C2C2;
    cursor: not-allowed;
}

/* ------------------------------------------
   ANIMATED CONTENT WRAPPER
------------------------------------------ */
.wq-dp-body {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 240px;
}
.wq-dp-body-inner {
    width: 100%;
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: opacity 200ms ease, transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}
.wq-dp-body-inner.wq-dp-exit-next {
    opacity: 0;
    transform: translateX(-14px);
}
.wq-dp-body-inner.wq-dp-exit-prev {
    opacity: 0;
    transform: translateX(14px);
}
.wq-dp-body-inner.wq-dp-exit-view {
    opacity: 0;
    transform: scale(0.96);
}
.wq-dp-body-inner.wq-dp-enter-next {
    opacity: 0;
    transform: translateX(14px);
}
.wq-dp-body-inner.wq-dp-enter-prev {
    opacity: 0;
    transform: translateX(-14px);
}
.wq-dp-body-inner.wq-dp-enter-view {
    opacity: 0;
    transform: scale(0.96);
}

/* Month/Year label fade on change */
.wq-dp-my-label {
    display: inline-block;
    transition: opacity 160ms ease;
}
.wq-dp-my-label.wq-dp-label-fade {
    opacity: 0;
}

/* ------------------------------------------
   CALENDAR GRID
------------------------------------------ */
.wq-dp-calendar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.wq-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    height: 34.4px;
    align-items: center;
}
.wq-dp-weekday {
    font-family: 'Inter', 'Lato', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #C2C2C2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: normal;
}
.wq-dp-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    height: 34.4px;
    align-items: center;
}
.wq-dp-day {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: 'Inter', 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #1F1F1F;
    border-radius: 30px;
    transition: background-color 120ms ease, color 120ms ease;
    position: relative;
}
.wq-dp-day:hover:not(.wq-dp-day-disabled):not(.wq-dp-day-selected) {
    background: #F0F2FD;
}
.wq-dp-day.wq-dp-day-outside {
    color: #C2C2C2;
}
.wq-dp-day.wq-dp-day-today {
    background: #EBEBEB;
    border-radius: 25px;
    font-weight: 600;
}
.wq-dp-day.wq-dp-day-selected {
    background: #4F66E4;
    color: #FFFFFF;
    border-radius: 30px;
    font-weight: 600;
}
.wq-dp-day.wq-dp-day-selected.wq-dp-day-today {
    background: #4F66E4;
    color: #FFFFFF;
}
.wq-dp-day.wq-dp-day-disabled {
    color: #E5E5EA;
    cursor: not-allowed;
    pointer-events: none;
}

/* ------------------------------------------
   MONTH / YEAR DROPDOWN VIEW
------------------------------------------ */
.wq-dp-my-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Distribute the 4 rows evenly across the body's available height
       (.wq-dp-body has min-height: 240px). Without this the grid is only
       as tall as its content (~190px) and leaves dead space below. */
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 0;
    box-sizing: border-box;
    min-height: 240px;
}
.wq-dp-my-item {
    /* Center text within each grid row; row height is now driven by 1fr
       so the button stretches to fill, and flex-centering keeps the
       label visually centered regardless of cell height. */
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1F1F1F;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 120ms ease;
}
.wq-dp-my-item:hover {
    background: #F0F2FD;
}
.wq-dp-my-item.wq-dp-my-selected {
    background: #4F66E4;
    color: #FFFFFF;
}

/* ------------------------------------------
   TIME PICKER (optional) — Figma 60:120160
   Layout: label on the left, three Select.Trigger pills on the right
   (Hour, Minute, AM/PM with chevron).
------------------------------------------ */
.wq-dp-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    width: 100%;
}
.wq-dp-time-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    text-transform: capitalize;
    letter-spacing: 0.42px;
    margin: 0px;
}
.wq-dp-time-triggers {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wq-dp-time-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid #C2C2C2;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #1F1F1F;
    cursor: pointer;
    box-sizing: border-box;
    height: 32px;
    transition: border-color 120ms ease, background-color 120ms ease;
    outline: none;
}
.wq-dp-time-trigger:hover {
    border-color: #999;
}
.wq-dp-time-trigger:focus-visible {
    border-color: #4F66E4;
}
.wq-dp-time-trigger-text {
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #1F1F1F;
}
.wq-dp-time-trigger-hour,
.wq-dp-time-trigger-min {
    width: 44px;
}
.wq-dp-time-trigger-hour .wq-dp-time-trigger-text,
.wq-dp-time-trigger-min .wq-dp-time-trigger-text {
    width: 28px;
}
.wq-dp-time-trigger-ampm {
    gap: 8px;
    padding: 4px 8px;
}
.wq-dp-time-trigger-ampm .wq-dp-time-trigger-text {
    font-size: 14px;
    line-height: 24px;
}
.wq-dp-time-trigger-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: transform 150ms ease;
    color: #1F1F1F;
}
.wq-dp-time-trigger-chevron svg {
    width: 16px;
    height: 16px;
}

/* ------------------------------------------
   TIME OPTION DROPDOWN POPOVER
   Independent popup per field (hour | minute | ampm).
------------------------------------------ */
.wq-dp-time-popover {
    position: absolute;
    background: #FFFFFF;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    padding: 4px 0;
    z-index: 15000000;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease;
    pointer-events: none;
    box-sizing: border-box;
}
.wq-dp-time-popover.wq-dp-time-pop-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.wq-dp-time-pop-num {
    width: 80px;
}
.wq-dp-time-pop-ampm {
    width: 90px;
}
.wq-dp-time-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.wq-dp-time-list::-webkit-scrollbar {
    width: 6px;
}
.wq-dp-time-list::-webkit-scrollbar-thumb {
    background: #D6D6D6;
    border-radius: 4px;
}
.wq-dp-time-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #1F1F1F;
    cursor: pointer;
    transition: background-color 100ms ease;
    user-select: none;
}
.wq-dp-time-option:hover {
    background: #F5F5F5;
}
.wq-dp-time-option.wq-dp-time-option-selected {
    background: #F0F2FD;
    color: #4F66E4;
    font-weight: 600;
}

