/* Doctor cards in the doctor profile card's design (doctor-profile.css): the Related doctors slider on department
   pages, and the doctors listing prototype (/doctors-listing-prototype) with the HIMS portal's title and filter bar. */
.dl-page .doc-section { min-height: 100vh; background: #f4f7fc; }

/* Title on the left, the specialty filter and consultant search on the right */
.dl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.dl-bar h1 { margin: 0 0 .2rem; color: #102b46; font-size: 1.75rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.dl-page .dl-bar p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.dl-bar-filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.dl-field { width: 320px; min-height: 42px; padding: .5rem 2.25rem .5rem .9rem; border: 1px solid #cfdcec; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23102a43' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 12px; color: var(--ink); font-size: .92rem; appearance: none; }
.dl-field::placeholder { color: #8a9bb0; }
.dl-field:focus { border-color: var(--kih-blue); outline: none; box-shadow: 0 0 0 .2rem rgba(9, 81, 158, .14); }
/* The browser's own suggestions arrow sits, invisible, over the drawn one so it still opens the list. */
.dl-field::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }
.dl-field::-webkit-search-cancel-button { margin-right: .35rem; }

/* Five cards across, on a wider page than the site's container so they keep their size. Each card sizes its own text
   and buttons to its width (the container queries below). */
.dl-page .container { max-width: 1680px; }
.dl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
.dl-grid .dl-card { container-type: inline-size; }

/* Slider on department pages (.doc-track in doctors.css): room around the cards keeps their lift and shadow from
   being clipped. */
.dl-track { margin: -.5rem -.75rem -2.25rem; padding: .5rem .75rem 2.25rem; scroll-padding-inline: .75rem; }
.dl-track .dl-card { box-shadow: 0 8px 18px rgba(4, 40, 79, .09); scroll-snap-align: start; }
.dl-track .dl-card:hover { box-shadow: 0 12px 24px rgba(4, 40, 79, .14); }

/* Card: photo, then speciality, name and designation, with the buttons lined up at the bottom */
.dl-card { display: flex; flex-direction: column; padding: .625rem .625rem 1rem; border: 1px solid #dbe6f2; border-radius: 26px; background: #fff; box-shadow: 0 18px 40px rgba(4, 40, 79, .1); transition: transform .25s ease, box-shadow .25s ease; }
.dl-card:hover { box-shadow: 0 26px 54px rgba(4, 40, 79, .16); transform: translateY(-4px); }
.dl-card[hidden] { display: none; }
.dl-photo { position: relative; overflow: hidden; aspect-ratio: 5 / 4; border-radius: 16px; background: linear-gradient(160deg, #e3eefa 0%, #f5f9fd 100%); }
.dl-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: linear-gradient(90deg, var(--kih-blue) 0%, var(--kih-blue) 65%, var(--kih-red) 65%); }
.dl-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* A doctor with no photo in HIMS: the same placeholder as the profile page. */
.dl-photo-empty { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Crect width='400' height='400' fill='%23e6f0fa'/%3E%3Ccircle cx='200' cy='158' r='72' fill='%23b9cde4'/%3E%3Cpath d='M66 400c0-86 60-142 134-142s134 56 134 142z' fill='%23b9cde4'/%3E%3C/svg%3E") center top / cover no-repeat; }

.dl-identity { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 1.1rem .5rem 0; text-align: center; }
.dl-card .dl-speciality { margin: 0; padding: .3rem .75rem; border-radius: 999px; background: var(--kih-red-soft); color: var(--kih-red); font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4; }
.dl-card h3 { margin: .75rem 0 .25rem; color: #102b46; font-size: 1.3rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.dl-card .dl-designation { margin: 0; color: var(--kih-blue); font-size: .92rem; font-weight: 600; line-height: 1.5; }

/* Both buttons share one row, each as wide as its label needs plus an even share of the rest. */
.dl-actions { display: flex; gap: .5rem; margin-top: 1.2rem; }
.dl-btn { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; padding: 0 .6rem; border: 1px solid transparent; border-radius: 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; text-decoration: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.dl-btn-book { background: var(--kih-red); color: #fff; box-shadow: 0 10px 22px rgba(229, 27, 62, .22); }
.dl-btn-book:hover { background: var(--kih-red-dark); color: #fff; }
.dl-btn-profile { border-color: #cfdcec; background: #fff; color: var(--kih-blue); }
.dl-btn-profile:hover { border-color: var(--kih-blue); background: var(--kih-blue); color: #fff; }

/* Listing cards: narrower cards get smaller text so both buttons keep one row, until they are too narrow and stack.
   Sizes the phone rules below also set use the same weight, so the phone rules win there. */
@container (max-width: 279.98px) {
    .dl-grid h3 { font-size: 1.15rem; }
    .dl-grid .dl-designation { font-size: .85rem; }
    .dl-grid .dl-actions { gap: .375rem; }
    .dl-grid .dl-btn { gap: .3rem; padding: 0 .4rem; font-size: .75rem; }
}
@container (max-width: 243.98px) {
    .dl-grid .dl-actions { gap: .25rem; }
    .dl-grid .dl-btn { padding: 0 .3rem; font-size: .7rem; }
}
@container (max-width: 225.98px) {
    .dl-grid .dl-actions { flex-direction: column; gap: .45rem; }
    .dl-grid .dl-btn { padding: 0 .4rem; font-size: .74rem; }
}
@media (min-width: 576px) {
    .dl-grid .dl-card { padding: .5rem .5rem .9rem; }
}
/* Department slider's narrowest cards: smaller button text keeps both labels and their icons on one line. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .dl-grid { gap: 1.25rem; }
    .dl-track .dl-card { padding: .5rem .5rem .9rem; }
    .dl-track .dl-actions { gap: .375rem; }
    .dl-track .dl-btn { gap: .3rem; padding: 0 .4rem; font-size: .75rem; }
}
@media (max-width: 1199.98px) {
    .dl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* The filters move under the title and share its width. */
    .dl-bar-filters { width: 100%; }
    .dl-field { flex: 1 1 220px; width: auto; }
}
@media (max-width: 767.98px) {
    .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Two slider cards across in the small container: too narrow for both buttons in a row, so they stack. */
    .dl-track .dl-actions { flex-direction: column; }
}
/* Phones: two compact cards side by side. */
@media (max-width: 575.98px) {
    .dl-bar { margin-bottom: 1.25rem; }
    .dl-bar h1 { font-size: 1.45rem; }
    .dl-page .dl-bar p { font-size: .88rem; }
    .dl-grid { gap: .75rem; }
    .dl-card { padding: .4rem .4rem .7rem; border-radius: 18px; }
    .dl-photo { border-radius: 12px; }
    .dl-photo::after { height: 4px; }
    .dl-identity { padding: .75rem .2rem 0; }
    .dl-card .dl-speciality { padding: .2rem .45rem; border-radius: 8px; font-size: .62rem; letter-spacing: .01em; }
    .dl-card h3 { margin: .5rem 0 .2rem; font-size: .98rem; }
    .dl-card .dl-designation { font-size: .74rem; line-height: 1.4; }
    .dl-actions { gap: .45rem; margin-top: .8rem; }
    .dl-btn { gap: .3rem; min-height: 36px; padding: 0 .4rem; border-radius: 9px; font-size: .74rem; }
}
/* Very small phones: one card across. */
@media (max-width: 359.98px) {
    .dl-grid { grid-template-columns: minmax(0, 1fr); }
    .dl-track { grid-auto-columns: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .dl-card, .dl-btn { transition: none; }
    .dl-card:hover { transform: none; }
}
