/* =============================================
   Doctor Listing Plugin – Stylesheet
   Clean, clinical, premium design
============================================= */

/* ── Reset ── */
.dl-wrapper *,
.dl-wrapper *::before,
.dl-wrapper *::after {
    box-sizing: border-box;
}

/* ── Wrapper ── */
.dl-wrapper {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 100%;
}

/* ═══════════════════════════════
   Filter Bar
═══════════════════════════════ */
.dl-filter-bar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.dl-filter-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Search */
.dl-search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.dl-search-wrap:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.dl-search-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    margin-left: 14px;
    display: block;
    min-width: 18px;
}
.dl-search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px 12px 8px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: transparent;
    outline: none;
}

/* ═══════════════════════════════
   Card as native link (single page redirect)
═══════════════════════════════ */
a.dl-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.dl-card-link:hover,
a.dl-card-link:focus {
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    transform: translateY(-3px);
    outline: none;
    border-color: #2563eb;
}
a.dl-card-link:hover .dl-name,
a.dl-card-link:focus .dl-name {
    color: #2563eb;
}
/* Name link (fallback when no card-level link) */
.dl-name-link {
    color: inherit;
    text-decoration: none;
}
.dl-name-link:hover {
    color: #2563eb;
    text-decoration: underline;
}
/* Phone link - always clickable inside card link */
.dl-phone-stop {
    position: relative;
}
.dl-phone-link {
    color: #2563eb;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.dl-phone-link:hover {
    text-decoration: underline;
}
.dl-search-input::placeholder { color: #9ca3af; }

/* Selects row */
.dl-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.dl-select {
    flex: 1 1 160px;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 13.5px;
    color: #374151;
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color .2s;
}
.dl-select:focus { border-color: #2563eb; }

.dl-search-btn {
    flex: 0 0 auto;
    padding: 11px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .3px;
}
.dl-search-btn:hover  { background: #1d4ed8; }
.dl-search-btn:active { transform: scale(.97); }

/* ═══════════════════════════════
   Loading Spinner
═══════════════════════════════ */
.dl-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}
.dl-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: dl-spin .7s linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════
   No Results
═══════════════════════════════ */
.dl-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: #9ca3af;
    gap: 12px;
    text-align: center;
}
.dl-no-results svg {
    width: 52px;
    height: 52px;
    color: #d1d5db;
}
.dl-no-results p {
    font-size: 15px;
    margin: 0;
}

/* ═══════════════════════════════
   Results Grid
═══════════════════════════════ */
.dl-results {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
.dl-results.dl-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ═══════════════════════════════
   Doctor Card
═══════════════════════════════ */
.dl-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .25s, transform .2s;
    animation: dl-fadeIn .35s ease both;
}
.dl-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
@keyframes dl-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card Header */
.dl-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
}
.dl-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}
.dl-avatar-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-avatar-placeholder svg {
    width: 26px;
    height: 26px;
    color: #3b82f6;
}
.dl-name {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
}
.dl-specialty-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
}

/* Card Body */
.dl-card-body {
    padding: 16px 24px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px 20px;
}
.dl-meta-item {}
.dl-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 3px;
}
.dl-value {
    font-size: 13.5px;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.4;
}
.dl-value a {
    color: #2563eb;
    text-decoration: none;
}
.dl-value a:hover { text-decoration: underline; }
.dl-value-empty { color: #9ca3af; font-style: italic; }

/* ═══════════════════════════════
   Footer (compact)
═══════════════════════════════ */
.dl-footer {
    display: flex;
    justify-content: center;
    padding: 28px 0 8px;
}
.dl-see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: #fff;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}
.dl-see-more-btn svg { width: 18px; height: 18px; }
.dl-see-more-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 4px 14px rgba(37,99,235,.15);
}

/* ═══════════════════════════════
   Pagination
═══════════════════════════════ */
.dl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 28px 0 8px;
}
.dl-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
}
.dl-page-btn:hover:not(.active):not([disabled]) {
    border-color: #2563eb;
    color: #2563eb;
}
.dl-page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
}
.dl-page-btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
}
.dl-page-btn svg { width: 16px; height: 16px; }
.dl-page-ellipsis {
    padding: 0 4px;
    color: #9ca3af;
    font-size: 14px;
    line-height: 38px;
}

/* ═══════════════════════════════
   Results Summary
═══════════════════════════════ */
.dl-summary {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}
.dl-summary strong { color: #374151; }

/* ═══════════════════════════════
   Responsive — Desktop (≥1280px)
═══════════════════════════════ */
@media (min-width: 1280px) {
    .dl-selects { flex-wrap: nowrap; }
    .dl-select  { flex: 1 1 0; }
    .dl-card-body { grid-template-columns: repeat(6, 1fr); }
}

/* ═══════════════════════════════
   Responsive — Laptop (1024px–1279px)
═══════════════════════════════ */
@media (min-width: 1024px) and (max-width: 1279px) {
    .dl-selects { flex-wrap: nowrap; }
    .dl-select  { flex: 1 1 0; min-width: 120px; }
    .dl-card-body { grid-template-columns: repeat(4, 1fr); }
    .dl-results.dl-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════
   Responsive — Tablet (768px–1023px)
═══════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
    .dl-filter-bar  { padding: 18px 20px; }
    .dl-selects     { flex-wrap: wrap; }
    .dl-select      { flex: 1 1 calc(50% - 10px); min-width: 0; }
    .dl-search-btn  { flex: 1 1 100%; }
    .dl-card-body   { grid-template-columns: repeat(3, 1fr); }
    .dl-results.dl-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .dl-name        { font-size: 16px; }
}

/* ═══════════════════════════════
   Responsive — Large Mobile (480px–767px)
═══════════════════════════════ */
@media (max-width: 767px) {
    .dl-filter-bar  { padding: 16px; border-radius: 10px; }
    .dl-selects     { flex-direction: column; gap: 8px; }
    .dl-select      { flex: 1 1 100%; width: 100%; }
    .dl-search-btn  { width: 100%; text-align: center; justify-content: center; }
    .dl-card-body   { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
    .dl-results.dl-cols-2 { grid-template-columns: 1fr; }
    .dl-see-more-btn { padding: 11px 24px; font-size: 13.5px; }
    .dl-pagination  { gap: 4px; }
    .dl-page-btn    { min-width: 34px; height: 34px; font-size: 13px; }
}

/* ═══════════════════════════════
   Responsive — Small Mobile (≤479px)
═══════════════════════════════ */
@media (max-width: 479px) {
    .dl-filter-bar  { padding: 14px; }
    .dl-search-input { font-size: 13px; }
    .dl-card-header { padding: 14px 16px 12px; gap: 12px; }
    .dl-avatar,
    .dl-avatar-placeholder { width: 44px; height: 44px; }
    .dl-avatar-placeholder svg { width: 22px; height: 22px; }
    .dl-name        { font-size: 14.5px; }
    .dl-card-body   { grid-template-columns: 1fr; padding: 12px 16px 16px; gap: 10px; }
    .dl-label       { font-size: 10px; }
    .dl-value       { font-size: 13px; }
    .dl-see-more-btn { width: 100%; justify-content: center; padding: 12px 20px; }
    .dl-footer      { padding: 20px 0 4px; }
}
