/* QuranLume reusable teacher profile cards */
.ql-teacher-card{position:relative;border:1px solid var(--border);border-radius:14px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;overflow:hidden}
.ql-teacher-card:hover,.ql-teacher-card:focus{border-color:#a9bdb1;box-shadow:0 10px 30px rgba(22,57,44,.08);outline:none}
.ql-teacher-photo{width:66px;height:66px;border-radius:50%;object-fit:cover;background:#edf4ee;flex:0 0 auto}
.ql-teacher-photo.large{width:92px;height:92px}
.ql-teacher-initials{display:grid;place-items:center;color:var(--green);font-weight:800;font-size:21px}
.ql-teacher-initials.large{font-size:28px}
.ql-teacher-rating-row{display:flex;align-items:center;gap:7px;min-height:22px;font-size:12px}
.ql-rating{font-weight:800;color:#aa7621}.ql-review-count{color:var(--muted)}
.ql-new-teacher{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#eef5f0;color:var(--green);font-weight:700;font-size:11px}
.ql-teacher-specialty{font-weight:700;color:var(--green)}
.ql-teacher-meta{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.ql-teacher-meta span{padding:5px 8px;border-radius:999px;background:#f4f7f4;color:#52645d;font-size:11px}

.teacher-grid{grid-template-columns:repeat(auto-fit,minmax(250px,280px));justify-content:center;align-items:stretch}
.teacher-grid .ql-public-teacher-card{display:flex;flex-direction:column;gap:0;align-items:stretch;padding:24px;min-height:390px;cursor:pointer;text-align:center}
.ql-public-teacher-card .ql-teacher-card-media{display:flex;justify-content:center;padding:0;margin-bottom:13px}.ql-public-teacher-card .ql-teacher-photo{width:88px;height:88px}.ql-public-teacher-card h2{font-size:27px;margin:6px 0}.ql-public-teacher-card p{margin:0 0 8px;font-size:13px}
.ql-public-teacher-card .ql-teacher-card-body{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center}.ql-public-teacher-card .ql-teacher-rating-row,.ql-public-teacher-card .ql-teacher-meta{justify-content:center}
.ql-teacher-card-actions{display:grid;grid-template-columns:1fr;gap:8px;width:100%;margin-top:auto;padding-top:12px}
.ql-public-teacher-card .ql-view-profile,.ql-public-teacher-card .ql-watch-intro{padding:9px 14px;font-size:12px;margin:0}
.ql-watch-intro{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--green)!important;color:#fff!important}

/* Onboarding uses small photo-sized profile tiles, independent of teacher count. */
#onboarding-form .teacher-choice-list{display:grid;grid-template-columns:repeat(auto-fill,180px);gap:10px;justify-content:start}
.ql-select-teacher-card{width:180px;height:188px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px 10px 22px;cursor:pointer;text-align:center}
.ql-select-teacher-card .ql-teacher-photo{width:52px;height:52px;font-size:15px;margin-bottom:2px}
.ql-select-teacher-card .ql-teacher-card-body{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center}
.ql-select-teacher-card h3{max-width:100%;font-size:13px;line-height:1.2;margin:0 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ql-select-teacher-card p{max-width:100%;font-size:11px;line-height:1.25;margin:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ql-select-teacher-card .ql-teacher-rating-row{justify-content:center;min-height:20px;margin-top:3px}
.ql-teacher-radio{position:absolute!important;opacity:0!important;pointer-events:none!important}
.ql-compact-actions{display:flex;align-items:center;gap:5px;margin-top:1px}
.ql-compact-profile-link,.ql-compact-intro-link{background:transparent!important;border:0!important;color:var(--green)!important;padding:4px 5px!important;font-size:10px!important;line-height:1.1!important;box-shadow:none!important;margin:0!important}
.ql-compact-intro-link{font-weight:800!important}
.ql-select-teacher-card.selected{border-color:var(--green);background:#f6fbf8;box-shadow:0 0 0 2px rgba(19,137,103,.09)}
.ql-selected-mark{display:none;position:absolute;right:8px;bottom:7px;color:var(--green);font-size:9px;font-weight:800}.ql-select-teacher-card.selected .ql-selected-mark{display:block}

.ql-profile-dialog,.ql-intro-dialog{width:min(760px,calc(100% - 28px));max-height:88vh;padding:0;border:0;border-radius:18px;box-shadow:0 24px 70px rgba(15,43,34,.28);overflow:auto;color:var(--navy)}
.ql-profile-dialog{height:88vh;max-height:88vh;overflow:hidden}
.ql-profile-dialog::backdrop,.ql-intro-dialog::backdrop{background:rgba(10,27,22,.5);backdrop-filter:blur(2px)}
.ql-profile-close{position:sticky;top:10px;float:right;z-index:2;margin:10px 10px 0 0;width:34px;height:34px;padding:0!important;border-radius:50%!important;background:#fff!important;color:var(--navy)!important;border:1px solid var(--border)!important;font-size:22px!important;line-height:1!important;box-shadow:0 4px 14px rgba(20,45,36,.1)!important}
.ql-profile-dialog-body{height:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:26px 28px 22px;overflow-y:auto;overflow-x:hidden}
.ql-profile-hero{display:grid;grid-template-columns:102px minmax(0,1fr);gap:16px;align-items:center;padding-bottom:16px;border-bottom:1px solid var(--border)}
.ql-profile-hero h2{font-size:31px;margin:4px 0}.ql-profile-hero p{margin:0}.ql-profile-hero .ql-teacher-rating-row{min-height:20px}
.ql-profile-intro-strip{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid var(--border)}
.ql-profile-intro-strip>div{display:grid;gap:2px}.ql-profile-intro-strip small{font-size:9px;letter-spacing:.11em;color:var(--muted);font-weight:800}.ql-profile-intro-strip b{font-size:14px}.ql-profile-intro-strip span{font-size:11px;color:var(--muted)}
.ql-profile-intro-strip .ql-watch-intro{padding:9px 13px!important;font-size:12px!important;white-space:nowrap}
.ql-profile-content{display:grid;flex:0 0 auto;min-height:0;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);grid-auto-rows:min-content;column-gap:28px;row-gap:0;align-items:start}
.ql-profile-content section{min-width:0;padding:16px 0;border-bottom:1px solid var(--border);align-self:start;overflow-wrap:anywhere}
.ql-profile-content section:nth-last-child(-n+2){border-bottom:0}
.ql-profile-content h3{font-size:16px;margin:0 0 7px}.ql-profile-content p{font-size:13px;line-height:1.55;margin:0}.ql-profile-content ul{margin:0;padding-left:20px;font-size:13px;line-height:1.55}
.ql-profile-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;align-items:start}.ql-profile-facts>div{min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:9px;background:#fafcfb}.ql-profile-facts small,.ql-profile-facts b{display:block}.ql-profile-facts small{color:var(--muted);font-size:10px;margin-bottom:3px}.ql-profile-facts b{font-size:12px}
.ql-profile-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.ql-profile-section-head span{font-size:10px;color:var(--muted)}
.ql-reviews{display:grid;gap:7px}.ql-review{padding:10px 11px;border-radius:9px;background:#f7faf8;border:1px solid var(--border)}.ql-review>div{display:flex;justify-content:space-between;gap:10px}.ql-review b,.ql-review span{font-size:11px}.ql-review span{color:#aa7621;font-weight:800}.ql-review p{margin-top:5px!important}.ql-empty-reviews{padding:10px 12px;border-radius:9px;background:#f7faf8;color:var(--muted);font-size:12px;line-height:1.45}
.ql-profile-actions{display:flex;justify-content:flex-end;padding-top:12px}.ql-profile-actions .button{padding:9px 13px;font-size:12px;margin:0}

.ql-intro-dialog{width:min(820px,calc(100% - 28px));overflow:hidden}
.ql-intro-dialog-body{padding:28px 28px 24px}
.ql-intro-heading{display:flex;align-items:center;gap:12px;padding-right:45px;margin-bottom:16px}.ql-intro-heading .ql-teacher-photo{width:52px;height:52px}.ql-intro-heading small{font-size:9px;letter-spacing:.12em;color:var(--muted);font-weight:800}.ql-intro-heading h2{margin:2px 0 0;font-size:24px}.ql-intro-heading p{margin:2px 0 0;font-size:12px;color:var(--muted)}
.ql-intro-dialog video{display:block;width:100%;max-height:64vh;background:#0c1512;border-radius:13px;object-fit:contain}
.ql-intro-note{font-size:11px!important;line-height:1.55!important;color:var(--muted);margin:12px 2px 0!important}

@media(max-width:700px){
 .teacher-grid .ql-public-teacher-card{padding:18px;min-height:360px}.ql-public-teacher-card .ql-teacher-photo{width:76px;height:76px}.ql-public-teacher-card h2{font-size:23px}
 .ql-profile-dialog{width:calc(100% - 16px);height:auto;max-height:92vh;overflow:auto}.ql-profile-dialog-body{height:auto;display:block;padding:20px 16px 18px}.ql-profile-hero{grid-template-columns:74px minmax(0,1fr);gap:12px}.ql-profile-hero .ql-teacher-photo.large{width:68px;height:68px}.ql-profile-hero h2{font-size:25px}.ql-profile-content{display:grid;grid-template-columns:1fr;grid-template-rows:none;column-gap:0}.ql-profile-content section{border-bottom:1px solid var(--border)!important}.ql-profile-content section:last-child{border-bottom:0!important}.ql-profile-facts{grid-template-columns:1fr}
 .ql-profile-intro-strip{align-items:flex-start;flex-direction:column;padding:10px 0}.ql-profile-intro-strip .ql-watch-intro{width:100%}
 .ql-intro-dialog-body{padding:22px 16px 18px}.ql-intro-dialog video{max-height:70vh}
}
@media(max-width:520px){
 #onboarding-form .teacher-choice-list{grid-template-columns:repeat(auto-fill,164px);gap:8px}
 .ql-select-teacher-card{width:164px;height:182px}
 .ql-profile-dialog,.ql-intro-dialog{width:calc(100% - 16px)}.ql-profile-dialog{max-height:92vh}.ql-intro-dialog{max-height:92vh}
 .ql-teacher-card-actions{display:grid;grid-template-columns:1fr}.ql-teacher-card-actions .button{width:100%}
}
