/* UTRWD inspection-booking calendar widget */

.utrwd-calendar-mount { display: none; }

.utrwd-cal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    max-width: 480px;
    margin: 12px auto;
    color: #333;
    box-sizing: border-box;
}
.utrwd-cal *, .utrwd-cal *:before, .utrwd-cal *:after { box-sizing: border-box; }

.utrwd-cal-heading {
    font-size: 22px;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 16px 0;
    text-align: center;
    line-height: 1.3;
}

.utrwd-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.utrwd-cal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.utrwd-cal-nav {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #333;
}
.utrwd-cal-nav:hover:not(:disabled) { background: #f5f5f5; }
.utrwd-cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }

.utrwd-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}
.utrwd-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #777;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.utrwd-cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    color: #bbb;
    user-select: none;
    min-height: 36px;
}
.utrwd-cal-blank { background: transparent; }

.utrwd-cal-available {
    background: #e8f5e9;
    color: #1b5e20;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.15s ease;
}
.utrwd-cal-available:hover { background: #c8e6c9; }
.utrwd-cal-available:focus {
    outline: 2px solid #2e7d32;
    outline-offset: 1px;
}
.utrwd-cal-selected,
.utrwd-cal-selected:hover {
    background: #2e7d32;
    color: #fff;
}

.utrwd-cal-times {
    border-top: 1px solid #eee;
    padding-top: 12px;
}
.utrwd-cal-times-label {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}
.utrwd-cal-times-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.utrwd-cal-time {
    background: #fff;
    border: 1px solid #2e7d32;
    color: #2e7d32;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s ease;
    font-family: inherit;
}
.utrwd-cal-time:hover { background: #e8f5e9; }
.utrwd-cal-time-selected,
.utrwd-cal-time-selected:hover {
    background: #2e7d32;
    color: #fff;
}

.utrwd-cal-hint {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

.utrwd-cal-error {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fdecea;
    border: 1px solid #f5c2c0;
    border-radius: 4px;
    color: #c62828;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 600px) {
    .utrwd-cal { padding: 12px; }
    .utrwd-cal-cell { font-size: 12px; min-height: 32px; }
    .utrwd-cal-time { padding: 8px 12px; font-size: 13px; }
}
