/* From/To range date+time picker (dual-month popup) for RemoteViewSettings.
   Markup lives in Views/RemoteViewSettings/Content.cshtml; behaviour in wwwroot/js/lc/rangePicker.js. */

/* From / To range picker: single-line, sits inline with the time-range buttons (38px tall). */
.range-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 6px;
    padding: 0rem .75rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

    /* Active (range mode) indicator: tint only, so it does not change the height. */
    .range-box.range-box-active {
        background-color: rgba(13, 110, 253, 1);
    }

.range-label {
    opacity: 0.8;
}

.range-display {
    box-sizing: border-box;
    height: 38px;
    min-width: 320px;
    text-align: left;
    color: #f8f9fa;
    background-color: #383838;
    border: 2px solid #555555;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
}

    .range-display.range-display-set {
        color: #f8f9fa;
        border-color: #0d6efd;
    }

/* Dual-month calendar popup (dark theme, matching the app) */
.range-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    background: #2d2d2d;
    color: #f8f9fa;
    border: 1px solid #555555;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    padding: 6px 8px;
    user-select: none;
}

.rp-header {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 32px;
    align-items: center;
    margin-bottom: 8px;
}

.rp-title {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.rp-nav {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #cccccc;
    font-size: 20px;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
}

    .rp-nav:hover {
        background: #454545;
    }

.rp-months {
    display: flex;
    gap: 22px;
}

.rp-dow {
    display: grid;
    grid-template-columns: repeat(7, 34px);
    margin-bottom: 4px;
}

    .rp-dow span {
        text-align: center;
        font-size: 12px;
        color: #9a9a9a;
        padding: 2px 0;
    }

.rp-grid {
    display: grid;
    grid-template-columns: repeat(7, 34px);
    grid-auto-rows: 32px;
}

.rp-empty {
    visibility: hidden;
}

.rp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #f8f9fa;
    cursor: pointer;
    border-radius: 6px;
}

    .rp-day:hover {
        background: #454545;
    }

.rp-in {
    background: rgba(27, 110, 194, 0.35);
    border-radius: 0;
}

.rp-start, .rp-end {
    background: #1b6ec2;
    color: #fff;
    border-radius: 0;
}

    .rp-start:hover, .rp-end:hover {
        background: #155a9c;
    }

.rp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
}

/* time-of-day row */
.rp-times {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #444444;
}

.rp-time-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .rp-time-field label {
        font-size: 11px;
        color: #9a9a9a;
    }

    .rp-time-field input[type="time"] {
        background: #383838;
        color: #f8f9fa;
        border: 1px solid #555555;
        border-radius: 4px;
        padding: 4px 6px;
        font-size: 13px;
    }

.rp-time-disabled {
    opacity: 0.4;
}

.rp-openend {
    margin-left: auto;
    align-self: center;
    border: 1px solid #555555;
    background: transparent;
    color: #4a9eff;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}

    .rp-openend:hover {
        background: #454545;
    }

    .rp-openend.rp-openend-active {
        background: #1b6ec2;
        border-color: #1b6ec2;
        color: #ffffff;
    }

.rp-hint {
    font-size: 12px;
    color: #9a9a9a;
}

.rp-actions {
    display: flex;
    gap: 8px;
}

.rp-btn {
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
}

.rp-cancel {
    background: #383838;
    color: #f8f9fa;
    border-color: #555555;
}

    .rp-cancel:hover {
        background: #2d2d2d;
    }

.rp-apply {
    background: #1b6ec2;
    color: #fff;
}

    .rp-apply:hover {
        background: #155a9c;
    }
