.roc-date-input {
    letter-spacing: 0.02em;
}

.roc-date-input::placeholder {
    color: #9aa1ac;
}

.roc-date-input.roc-date-input--invalid,
.roc-date-input.roc-date-input--invalid:focus {
    border-color: rgba(180, 35, 24, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(180, 35, 24, 0.1);
}

.roc-date-input[disabled],
.roc-date-input[readonly] {
    cursor: not-allowed;
}

.roc-date-input-wrapper {
    width: 100%;
}

.roc-date-input-group {
    display: flex;
    width: 100%;
    /* Bootstrap's .input-group sets position:relative; avoid inheriting that here since it's not needed. */
    position: static;
}

/* On pages that overlay an absolutely-positioned floating label on top of the input (e.g.
   ProgressQuery's .input-sign/.input-label), the input+button group now paints above the label
   (the flex layout added by roc-date-input-group promotes its children into a paint layer that
   outranks the label's implicit z-index:auto). The label already has position:absolute from
   Site.css; giving it an explicit z-index restores it to the top, matching the original design
   where the bare <input> (non-positioned) could never outrank it. Scoped here since this stylesheet
   only loads on pages using roc-date-input. */
.input-sign .input-label {
    z-index: 1;
}

.roc-date-input-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.roc-date-input-toggle[disabled] {
    cursor: not-allowed;
}

.roc-date-calendar-popup {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.175);
    padding: 10px;
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 380px) {
    .roc-date-calendar-popup {
        max-width: calc(100vw - 24px);
    }
}

.roc-date-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 8px;
}

.roc-date-calendar-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 6px;
    min-width: 0;
}

.roc-date-calendar-nav {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
}

.roc-date-calendar-nav:hover {
    background-color: #f0f0f0;
}

.roc-date-calendar-select {
    flex: 0 0 auto;
    width: auto;
    border-color: #dde1e6;
    background-color: #f8f9fb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.roc-date-calendar-select--year {
    min-width: 4.5em;
}

.roc-date-calendar-select--month {
    min-width: 3.5em;
}

.roc-date-calendar-select:hover {
    border-color: #9f1fe1;
}

.roc-date-calendar-select:focus {
    border-color: #9f1fe1;
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(159, 31, 225, 0.15);
}

.roc-date-calendar-unit {
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
}

.roc-date-calendar-weekdays,
.roc-date-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.roc-date-calendar-weekdays span {
    font-size: 0.85rem;
    color: #666;
    padding: 5px 0;
}

.roc-date-calendar-day {
    padding: 8px 0;
    cursor: pointer;
    border-radius: 4px;
}

.roc-date-calendar-day--empty {
    cursor: default;
}

.roc-date-calendar-day:hover:not(.roc-date-calendar-day--disabled):not(.roc-date-calendar-day--empty) {
    background-color: #f0f0f0;
}

.roc-date-calendar-day--today {
    font-weight: bold;
    color: #9f1fe1;
}

.roc-date-calendar-day--selected {
    background-color: #9f1fe1 !important;
    color: #fff !important;
}

.roc-date-calendar-day--disabled {
    color: #ccc;
    cursor: not-allowed;
}

.roc-date-calendar-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.roc-date-calendar-btn {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.roc-date-calendar-btn--ghost {
    background-color: transparent;
    border-color: #dde1e6;
    color: #555;
}

.roc-date-calendar-btn--ghost:hover {
    background-color: #f0f0f0;
    border-color: #c7ccd1;
}

.roc-date-calendar-btn--solid {
    background-color: #9f1fe1;
    color: #fff;
}

.roc-date-calendar-btn--solid:hover {
    background-color: #8a1ac4;
}