.medflex-schedule-list {
    --mfs-list-primary: #19b5ba;
    --mfs-list-text: inherit;
    --mfs-list-heading: #111827;
    --mfs-list-small-heading: #475569;
    --mfs-list-text-weight: 400;
    --mfs-list-heading-weight: 500;
    --mfs-list-small-heading-weight: 500;
    color: var(--mfs-list-text);
    font: inherit;
    font-weight: var(--mfs-list-text-weight);
    line-height: 1.5;
}

.medflex-schedule-list.is-single {
    margin-bottom: 70px;
}

.medflex-schedule-list [hidden] {
    display: none !important;
}

.medflex-schedule-list__items {
    display: grid;
    gap: 12px;
}

.medflex-schedule-list__single-title {
    color: var(--mfs-list-heading);
    font-size: 28px;
    font-weight: var(--mfs-list-heading-weight);
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 0 0 20px;
}

.medflex-schedule-list__reveal {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 1px solid var(--mfs-list-primary);
    border-radius: 9999px;
    color: var(--mfs-list-heading);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 500;
    justify-content: center;
    min-height: 48px;
    padding: 11px 20px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.medflex-schedule-list__reveal:hover,
.medflex-schedule-list__reveal:focus,
.medflex-schedule-list__reveal:active {
    background: var(--mfs-list-primary);
    border-color: var(--mfs-list-primary);
    color: #fff;
}

.medflex-schedule-list__reveal:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--mfs-list-primary) 35%, transparent);
    outline-offset: 2px;
}

.medflex-schedule-list__item {
    border: 1px solid #dbe4ea;
    border-radius: 16px;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.medflex-schedule-list__header {
    align-items: center;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    gap: 14px;
    min-height: 82px;
    padding: 13px 16px;
    text-align: left;
    transition: background 160ms ease;
    width: 100%;
}

.medflex-schedule-list__header:hover,
.medflex-schedule-list__header:active,
.medflex-schedule-list__item.is-open .medflex-schedule-list__header {
    background: color-mix(in srgb, var(--mfs-list-primary) 10%, white);
}

.medflex-schedule-list__toggle {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--mfs-list-primary);
    cursor: pointer;
    display: flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
    margin: 0 0 0 auto;
    padding: 0;
    transition: color 160ms ease, opacity 160ms ease;
    width: 30px;
}

.medflex-schedule-list__toggle:hover,
.medflex-schedule-list__toggle:focus,
.medflex-schedule-list__toggle:active {
    background: transparent;
    color: var(--mfs-list-primary);
    opacity: 0.75;
}

.medflex-schedule-list__toggle:focus-visible,
.medflex-schedule-list__toggle:active {
    outline: 3px solid color-mix(in srgb, var(--mfs-list-primary) 35%, transparent);
    outline-offset: 2px;
}

.medflex-schedule-list__avatar,
.medflex-schedule-list__avatar-placeholder {
    align-items: center;
    aspect-ratio: 1;
    background: color-mix(in srgb, var(--mfs-list-primary) 14%, white);
    border-radius: 9999px;
    color: var(--mfs-list-primary);
    display: flex;
    flex: 0 0 66px;
    font-size: 20px;
    font-weight: 500;
    height: 66px;
    justify-content: center;
    object-fit: cover;
    object-position: top;
    width: 66px;
}

img.medflex-schedule-list__avatar {
    border-radius: 9999px !important;
}

.medflex-schedule-list__avatar-link {
    border-radius: 9999px;
    display: flex;
    flex: 0 0 66px;
    height: 66px;
    overflow: hidden;
    text-decoration: none;
    width: 66px;
}

.medflex-schedule-list__doctor {
    display: block;
    min-width: 0;
}

.medflex-schedule-list__doctor-name {
    color: var(--mfs-list-heading);
    display: block;
    font-size: 20px;
    font-weight: var(--mfs-list-heading-weight);
    line-height: 1.25;
    text-decoration: none;
    transition: color 160ms ease;
}

.medflex-schedule-list__doctor-meta {
    color: #64748b;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 4px 12px;
    margin-top: 7px;
}

.medflex-schedule-list__arrow {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transform: rotate(0deg);
    transition: transform 180ms ease;
    width: 22px;
}

.medflex-schedule-list__item.is-open .medflex-schedule-list__arrow {
    transform: rotate(90deg);
}

.medflex-schedule-list__panel {
    animation: medflex-schedule-list-open 220ms ease both;
    background: #fbfdfe;
    border-top: 1px solid #dbe4ea;
    min-width: 0;
    padding: 4px 18px 18px;
}

.medflex-schedule-list__panel-loader {
    display: grid;
    gap: 9px;
    padding: 18px 0 2px;
}

.medflex-schedule-list__panel-loader-line {
    animation: medflex-schedule-list-shimmer 1.4s ease-in-out infinite;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--mfs-list-primary) 7%, white) 25%,
        color-mix(in srgb, var(--mfs-list-primary) 15%, white) 50%,
        color-mix(in srgb, var(--mfs-list-primary) 7%, white) 75%
    );
    background-size: 200% 100%;
    border-radius: 8px;
    display: block;
    height: 15px;
    width: 100%;
}

.medflex-schedule-list__panel-loader-line:nth-child(2) {
    width: 82%;
}

.medflex-schedule-list__panel-loader-line:nth-child(3) {
    width: 64%;
}

.medflex-schedule-list__panel-status {
    color: #64748b;
    font-size: 14px;
    margin: 18px 0 0;
}

.medflex-schedule-list__panel-status[data-state='error'] {
    color: #b91c1c;
}

.medflex-schedule-list__branches {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

.medflex-schedule-list__branch {
    border-top: 1px solid #e2e8f0;
    min-width: 0;
    padding-top: 18px;
}

.medflex-schedule-list__branch:first-child {
    border-top: 0;
}

.medflex-schedule-list.is-single .medflex-schedule-list__branch {
    background: color-mix(in srgb, var(--mfs-list-primary) 6%, white);
    border-radius: 24px;
    border-top: 0;
    padding: 20px;
}

.medflex-schedule-list__branch + .medflex-schedule-list__branch {
    margin-top: 18px;
}

.medflex-schedule-list__branch-name {
    color: var(--mfs-list-heading);
    font-size: 15px;
    font-weight: var(--mfs-list-small-heading-weight);
    line-height: 1.4;
    margin: 0;
}

.medflex-schedule-list__branch-address {
    color: #64748b;
    font-size: 13px;
    margin: 3px 0 0;
}

.medflex-schedule-list__dates {
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 10px;
    margin-top: 14px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 10px;
    scrollbar-color: color-mix(in srgb, var(--mfs-list-primary) 35%, #cbd5e1) #e2e8f0;
    scrollbar-width: thin;
    width: 100%;
}

.medflex-schedule-list__dates.has-overflow {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.medflex-schedule-list__dates::-webkit-scrollbar {
    -webkit-appearance: none;
    display: block;
    height: 7px;
}

.medflex-schedule-list__dates::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--mfs-list-primary) 35%, #cbd5e1);
    border-radius: 9999px;
}

.medflex-schedule-list__dates::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 9999px;
}

.medflex-schedule-list__date {
    background: #fff;
    border: 1px solid #dbe4ea;
    border-radius: 12px;
    flex: 0 0 160px;
    padding: 11px;
}

.medflex-schedule-list__date-title {
    color: var(--mfs-list-heading);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 9px;
}

.medflex-schedule-list__times {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.medflex-schedule-list__time {
    background: color-mix(in srgb, var(--mfs-list-primary) 10%, white);
    border: 1px solid color-mix(in srgb, var(--mfs-list-primary) 30%, white);
    border-radius: 8px;
    color: #1e293b;
    font-size: 13px;
    line-height: 1;
    padding: 7px 8px;
}

.medflex-schedule-list__empty,
.medflex-schedule-list__status {
    color: #64748b;
    font-size: 14px;
    margin: 14px 0 0;
}

.medflex-schedule-list__status[data-state='error'] {
    color: #b91c1c;
}

.medflex-schedule-list__skeleton {
    display: none;
}

.medflex-schedule-list.is-booting .medflex-schedule-list__skeleton {
    display: grid;
    gap: 12px;
}

.medflex-schedule-list__skeleton-line {
    animation: medflex-schedule-list-shimmer 1.4s ease-in-out infinite;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--mfs-list-primary) 7%, white) 25%,
        color-mix(in srgb, var(--mfs-list-primary) 15%, white) 50%,
        color-mix(in srgb, var(--mfs-list-primary) 7%, white) 75%
    );
    background-size: 200% 100%;
    border-radius: 12px;
    display: block;
}

.medflex-schedule-list__skeleton-row {
    height: 82px;
    width: 100%;
}

@keyframes medflex-schedule-list-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@keyframes medflex-schedule-list-open {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .medflex-schedule-list__single-title {
        font-size: 26px;
    }
}

@media (max-width: 620px) {
    .medflex-schedule-list__header {
        gap: 11px;
        padding: 12px;
    }

    .medflex-schedule-list__avatar,
    .medflex-schedule-list__avatar-placeholder,
    .medflex-schedule-list__avatar-link {
        flex-basis: 48px;
        height: 48px;
        width: 48px;
    }

    .medflex-schedule-list__doctor-name {
        font-size: 16px;
    }

    .medflex-schedule-list__panel {
        padding: 3px 13px 15px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .medflex-schedule-list *,
    .medflex-schedule-list *::before,
    .medflex-schedule-list *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
