/* =============================================================================
   IC Doctor Popup — Stylesheet
   Plugin:  IC Doctor Popup v1.0.1
 
   ========================================================================== */

/* ── Scroll lock  */
body.doctor-popup-open {
    overflow: hidden;
}

/* ── Full-screen wrapper */
.doctor-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Overlay */
.doctor-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* ── Popup box ─── */
.doctor-popup-box {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: doctorPopupIn 0.25s ease;
}

@keyframes doctorPopupIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Close button  */
.doctor-popup-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: color 0.2s;
}
.doctor-popup-close:hover {
    color: #111;
}

/* ── Body: image + details */
.doctor-popup-body {
    display: flex;
    gap: 0;
}

/* ── Image column */
.doctor-popup-image {
    flex: 0 0 280px;
    max-width: 280px;
}
.doctor-popup-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px 0 0 14px !important;
    display: block;
}

/* ── Details column */
.doctor-popup-details {
    flex: 1;
    padding: 40px 40px 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 393px;
    overflow: auto;
}

.doctor-popup-name {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: #111;
    padding-right: 36px; /* clear close button */
}

.doctor-popup-specialisation {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #e16242;
    margin: 0;
}

.doctor-popup-email {
    margin: 0;
    font-size: 0.9rem;
}
.doctor-popup-email a {
    color: #e16242;
    text-decoration: none;
}
.doctor-popup-email a:hover {
    text-decoration: underline;
}

.doctor-popup-bio {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #444;
}
.doctor-popup-bio p {
    margin: 0 0 10px;
}

/* ── Loading dots  ─── */
.doctor-popup-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 70px 20px;
}
.doctor-popup-loading span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    animation: doctorBounce 0.8s ease-in-out infinite;
}
.doctor-popup-loading span:nth-child(2) { animation-delay: 0.15s; }
.doctor-popup-loading span:nth-child(3) { animation-delay: 0.30s; }

@keyframes doctorBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1;   }
}

/* ── Error state ───── */
.doctor-popup-error {
    text-align: center;
    padding: 40px;
    color: #c0392b;
    font-size: 0.95rem;
}

/* =============================================================================
   Doctor Grid (card loop)
   ========================================================================== */

.doctor-loop-grid {
    display: grid;
    gap: 24px;
}

/* Column variants */
.doctor-loop-cols-1 { grid-template-columns: 1fr; }
.doctor-loop-cols-2 { grid-template-columns: repeat(2, 1fr); }
.doctor-loop-cols-3 { grid-template-columns: repeat(3, 1fr); }
.doctor-loop-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Card */
.doctor-card {
    background: #fff;
    border-radius: 12px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); */
    border: 1px solid #ccc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* Card image */
.doctor-card-image {
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #f0f4f8;
}
.doctor-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}


/* Placeholder when no image */
.doctor-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}

/* Card body */
.doctor-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.doctor-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #111;
    cursor: pointer;
    transition: color 0.2s;
    margin: 0 ;
}
.doctor-card-name:hover {
    color: #e16242;
}

.doctor-card-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #666;
    margin: 0 !important;
    flex: 1;
}

/* "View Profile" button */
.doctor-card-btn {
    margin-top: auto;
    display: inline-block;
    padding: 9px 20px;
    background: #e16242;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    align-self: flex-start;
}
.doctor-card-btn:hover{
	 color: #fff;
     background: #e16242 ;
} 

/* Empty state */
.doctor-loop-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
    font-size: 0.95rem;
}

/* =============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .doctor-loop-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .doctor-loop-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .doctor-loop-cols-2,
    .doctor-loop-cols-3,
    .doctor-loop-cols-4 { grid-template-columns: 1fr; }

    /* Popup responsive */
    .doctor-popup-body {
        flex-direction: column;
    }
    .doctor-popup-image {
        flex: none;
        max-width: 100%;
    }
    .doctor-popup-image img {
        border-radius: 14px 14px 0 0;
        max-height: 280px;
    }
    .doctor-popup-details {
        padding: 24px 20px 30px;
    }
    .doctor-popup-name {
        font-size: 1.35rem;
    }
}
