.rules-slot-tip--booked .rules-slot-tip-status { color: #a8505f; }
.rules-slot-tip--break .rules-slot-tip-status { color: #a97e2c; }
.rules-slot-tip--cutoff .rules-slot-tip-status { color: #61788f; }

.rules-slot-tip-why {
    margin: 5px 0 0;
    color: var(--muted);
}

.rules-slot-tip-meta {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: var(--muted);
}

/* A small pointer, flipped to the side the card sits on. */
.rules-slot-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #fffdfb;
    filter: drop-shadow(0 1px 0 #eadfd4);
    bottom: -10px;
}

.rules-slot-tip--above::after {
    bottom: auto;
    top: -10px;
    border-top-color: transparent;
    border-bottom-color: #fffdfb;
    filter: drop-shadow(0 -1px 0 #eadfd4);
}

@keyframes rules-tip-in {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .rules-slot-tip { animation: none; }
}

.rules-card-head { margin-bottom: 16px; }

.rules-card-head h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    margin: 0 0 4px;
}

.rules-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.rules-current {
    background: #faf5ef;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin: 0 0 14px;
}

.rules-alert {
    background: rgba(184, 147, 79, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 14px;
}

.rules-grid { display: grid; gap: 14px; margin-bottom: 14px; }

/* Opening hours / groomer hours: one compact row per weekday instead of a
   stacked label-above-input card, so five days fit in the space two used to. */
.rules-days { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.rules-day {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
}

.rules-day label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.rules-day .rules-time-pair { min-width: 0; }

/* Time inputs are as tall as a full-width public form field by default, which
   is oversized for a dense per-weekday grid — '09:00' and the native clock
   icon need very little room. Tighten just these, so the Capacity/Break tabs
   keep their comfortable sizing. */
.rules-day .rules-time-pair input[type="time"] {
    padding: 4px 8px;
    font-size: 0.85rem;
}

/* A closed / unset note sits under the row, spanning both columns. */
.rules-day-note { grid-column: 1 / -1; }

/* Narrow cards: stack the label above the times again so the inputs keep a
   usable width instead of being squeezed by the label column. */
@media (max-width: 420px) {
    .rules-day { grid-template-columns: 1fr; }
}

.rules-grid--two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.rules-grid--three { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.rules-field { display: flex; flex-direction: column; gap: 5px; }

.rules-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.rules-field input,
.rules-field select {
    border: 2px solid #efe5db;
    border-radius: 6px;
    padding: 9px 11px;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
    min-width: 0;
}

.rules-field input:focus,
.rules-field select:focus {
    outline: none;
    border-color: var(--primary);
}

.rules-time-pair { display: flex; align-items: center; gap: 7px; }

.rules-time-pair input { flex: 1; min-width: 0; }

.rules-time-sep { color: var(--muted); font-size: 0.82rem; }

.rules-hint { margin: 0; font-size: 0.82rem; color: var(--muted); }

.rules-hint--warn { color: var(--accent); font-weight: 600; }

.rules-form .btn { margin-top: 2px; }

.rules-form--inline { margin-top: 10px; }

.rules-closed-list {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rules-closed-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: #faf5ef;
    border-radius: 6px;
    font-size: 0.88rem;
}

.rules-closed-date { font-weight: 600; min-width: 130px; }

.rules-closed-reason { color: var(--muted); flex: 1; }

.rules-inline-form { display: inline; margin: 0; }

.rules-groomer {
    border-top: 1px solid #efe5db;
    padding-top: 14px;
    margin-top: 14px;
}

.rules-groomer:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.rules-groomer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.rules-groomer-head h4 {
    font-family: 'Fraunces', serif;
    font-size: 0.98rem;
    margin: 0;
}

.rules-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.rules-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--muted);
}

.rules-legend-item { display: inline-flex; align-items: center; gap: 6px; }

.rules-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.rules-dot--ok { background: var(--secondary); }
.rules-dot--full { background: var(--primary); }
.rules-dot--off { background: #d8ccc2; }

.rules-preview-meta {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.rules-preview-scroll { overflow-x: auto; }

.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.rules-table th,
.rules-table td {
    border: 1px solid #efe5db;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}

.rules-table thead th {
    background: #faf5ef;
    font-size: 0.8rem;
    white-space: nowrap;
}

.rules-table tbody th {
    background: #faf5ef;
    font-weight: 600;
    white-space: nowrap;
}

.rules-th-sub { font-weight: 400; color: var(--muted); font-size: 0.72rem; }

.rules-cell--ok { background: rgba(111, 154, 184, 0.06); }
.rules-cell--full { background: rgba(196, 129, 143, 0.07); }
.rules-cell--off { background: #f7f4f1; }

.rules-none { color: var(--muted); font-style: italic; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.contact-info h2 {
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.contact-info h2 + .contact-list + h2 {
    margin-top: 28px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.contact-list li {
    color: var(--muted);
    margin-bottom: 8px;
}

.contact-sent p {
    color: var(--muted);
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
