/* The agenda's and the appointment types' editors (Phppot\ScheduleMarkup, Phppot\AppointmentTypeMarkup):
   the groups of days with their day toggles and ranges, the type rows, their bins and add buttons.
   Drawn on the sign-up wizard's steps 4 and 5 and the dashboard's professional profile view, in
   the theme's tokens. */

.schedule-groups,
.appointment-type-rows {
    display: grid;
    gap: var(--space-12);
}

.schedule-group {
    padding: var(--space-12);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.schedule-group.is-invalid {
    border-color: var(--danger-text);
}

/* A hint under a field of the practice's forms: the time zone, Sin horario de atención. */
.practice-field-hint {
    margin: calc(-1 * var(--space-8)) 0 var(--space-12);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 18px;
}

/* Sin horario de atención: the switch over the editor, which fades while it is ticked. */
.schedule-none {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin: 0 0 var(--space-8);
    cursor: pointer;
}

.schedule-none input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.schedule-editor.is-emptied {
    opacity: 0.5;
}

.schedule-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-8);
}

/* Day toggles: Lu to Do as round buttons over hidden, still focusable, checkboxes. */
.schedule-days {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.schedule-days legend {
    width: 100%;
    margin-bottom: var(--space-8);
    padding: 0;
    color: var(--text-primary);
    font-size: 13.6px;
    font-weight: 500;
}

.schedule-day {
    position: relative;
}

.schedule-day input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.schedule-day span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-control);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 14px;
}

.schedule-day input:checked + span {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--on-primary);
}

.schedule-day input:disabled {
    cursor: not-allowed;
}

.schedule-day input:disabled + span {
    opacity: 0.35;
}

.schedule-day input:focus-visible + span {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.schedule-day .schedule-day-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* A range, De and Hasta, and a type, its name and its duration, each with its bin at the right. */
.schedule-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
    gap: var(--space-8);
    align-items: end;
}

.appointment-type {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 36px;
    gap: var(--space-8);
    align-items: end;
}

.appointment-type.is-invalid input {
    border-color: var(--danger-text);
}

.practice-remove {
    display: inline-grid;
    place-items: center;
    width: var(--icon-button);
    height: var(--icon-button);
    margin-bottom: 1px;
    border: 0;
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--icon-action);
    cursor: pointer;
}

.practice-remove:hover,
.practice-remove:focus-visible {
    background: var(--tint-primary);
    color: var(--danger-text);
}

.practice-remove:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.storg-button.practice-add {
    min-height: 36px;
    margin-top: var(--space-12);
    padding: 0 var(--space-12);
    font-size: 14px;
}

.storg-button.practice-add[disabled] {
    cursor: not-allowed;
}
