:root{
    --booking-navy:#0b2f5b;
    --booking-navy-2:#123e73;
    --booking-blue:#1769d2;
    --booking-blue-2:#2f80ed;
    --booking-blue-soft:#eef6ff;
    --booking-blue-soft-2:#f7fbff;
    --booking-ink:#17324d;
    --booking-muted:#71859b;
    --booking-line:#dce8f5;
    --booking-line-2:#eaf1f8;
    --booking-surface:#ffffff;
    --booking-bg:#f5f9fd;
    --booking-green:#2fa64a;
    --booking-red:#ef4b4b;
    --booking-shadow:0 18px 48px rgba(20,63,111,.08);
}

body.booking-public-page{
    min-height:100vh;
    background:
        radial-gradient(circle at 88% 6%,rgba(47,128,237,.10),transparent 28%),
        linear-gradient(180deg,#fbfdff 0,#f5f9fd 58%,#f7fafc 100%);
    color:var(--booking-ink);
}

.booking-public-page *{box-sizing:border-box}
.booking-public-page button,.booking-public-page input,.booking-public-page select,.booking-public-page textarea{font-family:'IRANSans',Tahoma,Arial,sans-serif!important}

.booking-site-header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(220,232,245,.9);
}
.booking-site-header__inner{
    width:min(1240px,calc(100% - 40px));
    min-height:74px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}
.booking-brand{display:flex;align-items:center;gap:12px;min-width:0}
.booking-brand__mark{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,var(--booking-blue-2),var(--booking-navy));box-shadow:0 10px 24px rgba(23,105,210,.2)}
.booking-brand__mark svg{width:32px;height:32px}
.booking-brand__text{display:grid;gap:2px;min-width:0}
.booking-brand__text strong{color:var(--booking-navy);font-size:16px;white-space:nowrap}
.booking-brand__text small{color:var(--booking-muted);font-size:11px}
.booking-header-badge{display:flex;align-items:center;gap:8px;color:var(--booking-blue);font-size:12px;font-weight:700;background:var(--booking-blue-soft);border:1px solid #d9eaff;padding:9px 12px;border-radius:999px}
.booking-header-badge svg{width:18px;height:18px}

.booking-public-wrap{width:min(1240px,calc(100% - 40px));margin:0 auto;padding:34px 0 54px}
.booking-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:24px}
.booking-hero__content{display:flex;align-items:center;gap:16px}
.booking-hero__icon{width:58px;height:58px;flex:0 0 58px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#eaf4ff,#dfeeff);color:var(--booking-blue);box-shadow:inset 0 0 0 1px #d9eafe}
.booking-hero__icon svg{width:29px;height:29px}
.booking-hero__eyebrow{margin:0 0 4px;color:var(--booking-blue);font-size:12px;font-weight:800}
.booking-hero h1{margin:0;color:var(--booking-navy);font-size:34px;line-height:1.35}
.booking-hero p:last-child{margin:7px 0 0;color:var(--booking-muted);font-size:14px;line-height:1.9}
.booking-hero__steps{display:flex;align-items:center;gap:9px;white-space:nowrap;color:#64809c;font-size:11px}
.booking-hero__steps span{display:flex;align-items:center;gap:6px}
.booking-hero__steps b{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;color:#fff;background:var(--booking-blue);font-size:11px}
.booking-hero__steps i{display:block;width:24px;height:1px;background:#cbd9e7}
.booking-flash{box-shadow:0 9px 28px rgba(18,62,115,.06);border:1px solid transparent}
.booking-flash.success{border-color:#ccebd9}.booking-flash.error{border-color:#f5cccc}

.booking-public-form{margin:0}
.booking-layout{display:grid;grid-template-columns:340px minmax(0,1fr);grid-template-areas:"summary main";gap:24px;align-items:start;direction:ltr}
.booking-main{grid-area:main;direction:rtl;min-width:0;display:grid;gap:18px}
.booking-summary{grid-area:summary;direction:rtl;min-width:0}
.booking-summary__sticky{position:sticky;top:98px}

.booking-panel,.booking-summary__sticky{
    background:rgba(255,255,255,.97);
    border:1px solid var(--booking-line);
    border-radius:22px;
    box-shadow:var(--booking-shadow);
}
.booking-panel{padding:22px}
.booking-section-head{display:flex;align-items:center;gap:12px;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--booking-line-2)}
.booking-section-head__icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;color:var(--booking-blue);background:var(--booking-blue-soft)}
.booking-section-head__icon svg{width:22px;height:22px}
.booking-section-head>div{display:grid;gap:2px}
.booking-section-head span{font-size:10px;color:#8294a8;font-weight:700}
.booking-section-head h2{margin:0;color:var(--booking-navy);font-size:18px}

.booking-field{margin-bottom:17px}
.booking-field--flush{margin-bottom:0}
.booking-field label{display:flex;align-items:center;gap:5px;color:var(--booking-navy);font-size:12px;font-weight:800;margin-bottom:8px}
.booking-field label em{font-style:normal;color:#e63e3e}
.booking-field label span{font-size:10px;color:#91a1b1;font-weight:500}
.booking-control{position:relative}
.booking-control--select::after{content:'⌄';position:absolute;left:14px;top:50%;transform:translateY(-56%);pointer-events:none;color:#446885;font-size:20px;font-weight:700}
.booking-public-page select,.booking-public-page input,.booking-public-page textarea{
    width:100%;
    border:1px solid #cfdff0;
    background:#fff;
    color:var(--booking-ink);
    border-radius:13px;
    padding:12px 14px;
    min-height:48px;
    outline:none;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.booking-public-page select{appearance:none;padding-left:42px;cursor:pointer}
.booking-public-page textarea{min-height:96px;resize:vertical;line-height:1.9}
.booking-public-page select:focus,.booking-public-page input:focus,.booking-public-page textarea:focus{border-color:#79afe9;box-shadow:0 0 0 4px rgba(47,128,237,.10)}
.booking-public-page select:disabled{background:#f4f7fa;color:#93a2b1;cursor:not-allowed}

.booking-doctor-card{position:relative;margin:0 0 18px!important;padding:15px!important;gap:14px!important;border:1px solid #cfe3fa!important;border-radius:17px!important;background:linear-gradient(135deg,#f9fcff,#eaf4ff)!important;box-shadow:none!important}
.booking-doctor-card .doctor-preview__photo{width:78px!important;height:78px!important;flex-basis:78px!important;background:#dceeff!important;border:4px solid #fff!important;box-shadow:0 6px 18px rgba(29,91,158,.14)!important}
.booking-doctor-card .doctor-preview__info small{color:#7990a7!important;font-size:10px!important}
.booking-doctor-card .doctor-preview__info strong{color:var(--booking-navy)!important;font-size:17px!important}
.booking-doctor-card .doctor-preview__info span{color:#55718e!important}
.booking-verified{margin-right:auto;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#fff;background:var(--booking-blue);box-shadow:0 5px 12px rgba(23,105,210,.18)}
.booking-verified svg{width:18px;height:18px}

.booking-service-card{display:flex;align-items:center;gap:13px;padding:14px 15px;margin:-2px 0 18px;border:1px solid #d6e8fb;border-radius:16px;background:linear-gradient(135deg,#f6fbff,#ebf5ff)}
.booking-service-card[hidden]{display:none!important}
.booking-service-card__icon{width:48px;height:48px;flex:0 0 48px;border-radius:15px;display:grid;place-items:center;color:var(--booking-blue);background:#fff;border:1px solid #d6e8fb}
.booking-service-card__icon svg{width:25px;height:25px}
.booking-service-card>div{display:grid;gap:3px}
.booking-service-card small{color:#7d91a6;font-size:10px}
.booking-service-card strong{color:var(--booking-navy);font-size:14px}
.booking-service-card span{color:#72879d;font-size:11px;line-height:1.8}

.booking-date-time-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:18px;align-items:start}
.booking-date-column,.booking-time-column{min-width:0}
.booking-date-column .availability-calendar{max-width:none;width:100%;padding:16px;border-color:#dbe8f5;border-radius:18px;box-shadow:none;background:#fbfdff}
.booking-date-column .availability-calendar__head strong{color:var(--booking-navy);font-size:16px}
.booking-date-column .calendar-nav{background:#eef6ff;border-color:#d7e8fa;color:var(--booking-blue);border-radius:11px}
.booking-date-column .calendar-nav:hover:not(:disabled){background:#dfeeff}
.booking-date-column .availability-calendar__week span{color:#71879e}
.booking-date-column .availability-calendar__days{min-height:250px}
.booking-date-column .calendar-day{border-radius:11px;font-size:13px}
.booking-date-column .calendar-day.is-available{background:var(--booking-green);box-shadow:0 4px 12px rgba(47,166,74,.16)}
.booking-date-column .calendar-day.is-unavailable{background:var(--booking-red);color:#fff;opacity:.95}
.booking-date-column .calendar-day.is-outside{background:#edf1f5;color:#a7b2bd}
.booking-date-column .calendar-day.is-other{color:#c5ced7;background:transparent}
.booking-date-column .calendar-day.is-selected{outline:3px solid rgba(11,47,91,.35);box-shadow:0 0 0 2px #fff inset,0 6px 16px rgba(11,47,91,.16)}
.booking-date-column .availability-calendar__legend{color:#6e8296;border-color:#e7eff7}
.booking-date-column .calendar-status{color:#70849a}
.booking-date-column .calendar-placeholder{background:#f4f8fc;color:#7f91a4}

.booking-time-slots{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;align-content:start}
.booking-time-slots .slot{min-height:47px;padding:9px 8px!important;border:1px solid #d5e3f2!important;border-radius:12px!important;background:#fff!important;color:#224462!important;font-size:11px;font-weight:700;line-height:1.65;transition:.15s ease}
.booking-time-slots .slot:hover:not(:disabled){border-color:#7eb1e8!important;background:#f5faff!important;transform:translateY(-1px)}
.booking-time-slots .slot.active{border-color:var(--booking-blue)!important;background:linear-gradient(145deg,var(--booking-blue-2),var(--booking-blue))!important;color:#fff!important;box-shadow:0 8px 18px rgba(23,105,210,.2)!important}
.booking-time-slots .slot.is-booked{background:#fff1f1!important;border-color:#f3c7c7!important;color:#bd4a4a!important;transform:none!important}
.booking-time-slots .slot.is-full{background:#f2f4f6!important;border-color:#e1e5e9!important;color:#8b98a4!important;transform:none!important}
.booking-empty-state{grid-column:1/-1;min-height:150px;border:1px dashed #dbe6f1;border-radius:14px;background:#f8fbfe;display:grid;place-items:center;padding:20px;text-align:center}
.booking-inline-note{display:flex;align-items:flex-start;gap:7px;margin-top:12px;padding:11px 12px;border-radius:12px;background:#f3f8fe;color:#6f8499;font-size:10px;line-height:1.8}
.booking-inline-note svg{width:17px;height:17px;flex:0 0 17px;margin-top:1px;color:var(--booking-blue)}

.booking-patient-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.booking-notes-field{margin-top:14px}

.booking-summary__sticky{padding:18px}
.booking-summary__head{display:flex;align-items:flex-start;gap:11px;padding:5px 4px 16px;margin-bottom:6px;border-bottom:1px solid var(--booking-line-2)}
.booking-summary__head-icon{width:42px;height:42px;flex:0 0 42px;border-radius:13px;display:grid;place-items:center;color:var(--booking-blue);background:var(--booking-blue-soft)}
.booking-summary__head-icon svg{width:22px;height:22px}
.booking-summary__head h2{margin:0;color:var(--booking-navy);font-size:17px}
.booking-summary__head p{margin:4px 0 0;color:#8192a4;font-size:10px;line-height:1.8}
.booking-summary__doctor{display:flex;align-items:center;gap:11px;padding:14px 4px 15px;border-bottom:1px solid var(--booking-line-2)}
.booking-summary__avatar{width:56px;height:56px;flex:0 0 56px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#eaf3fb;color:#486c8d;font-weight:800;border:3px solid #fff;box-shadow:0 5px 15px rgba(29,91,158,.12)}
.booking-summary__avatar img{width:100%;height:100%;object-fit:cover}
.booking-summary__doctor>div:last-child{display:grid;gap:2px;min-width:0}
.booking-summary__doctor small,.booking-summary__row small{font-size:9px;color:#8496a8}
.booking-summary__doctor strong{font-size:13px;color:var(--booking-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.booking-summary__doctor span{font-size:10px;color:#72889f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.booking-summary__rows{display:grid}
.booking-summary__row{display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:center;padding:13px 4px;border-bottom:1px solid var(--booking-line-2)}
.booking-summary__row-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--booking-blue);background:#f0f7ff}
.booking-summary__row-icon svg{width:18px;height:18px}
.booking-summary__row>div{display:grid;gap:2px;min-width:0}
.booking-summary__row strong{font-size:11px;color:#294761;line-height:1.8;word-break:break-word}
.booking-summary__secure{display:flex;align-items:flex-start;gap:8px;margin:14px 0;padding:11px;border-radius:12px;background:#f5f9fd;color:#71869a;font-size:9px;line-height:1.8}
.booking-summary__secure svg{width:17px;height:17px;flex:0 0 17px;color:#4f86bd}
.booking-primary-btn,.booking-secondary-btn{width:100%;min-height:49px;border-radius:13px;border:0;display:flex;align-items:center;justify-content:center;gap:9px;font:inherit;font-weight:800;cursor:pointer;transition:.15s ease}
.booking-primary-btn{color:#fff;background:linear-gradient(145deg,#2379e3,#0e5fc5);box-shadow:0 11px 24px rgba(23,105,210,.22)}
.booking-primary-btn svg,.booking-secondary-btn svg{width:19px;height:19px}
.booking-primary-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 14px 28px rgba(23,105,210,.26)}
.booking-primary-btn:disabled{background:#b9c8d8;box-shadow:none;cursor:not-allowed;opacity:.75}
.booking-secondary-btn{margin-top:9px;background:#f6faff;color:#315f8b;border:1px solid #cfe1f4}
.booking-secondary-btn:hover{background:#edf6ff}
.booking-summary__hint{margin:12px 4px 0;text-align:center;color:#8999a8;font-size:9px;line-height:1.9}

@media (max-width:1100px){
    .booking-site-header__inner,.booking-public-wrap{width:min(calc(100% - 28px),980px)}
    .booking-layout{grid-template-columns:300px minmax(0,1fr);gap:18px}
    .booking-date-time-grid{grid-template-columns:1fr}
    .booking-time-slots{grid-template-columns:repeat(3,minmax(0,1fr))!important}
    .booking-summary__sticky{top:92px}
    .booking-hero__steps{display:none}
}

@media (max-width:900px){
    .booking-layout{grid-template-columns:1fr;grid-template-areas:"main" "summary"}
    .booking-summary__sticky{position:static;display:block}
    .booking-summary__secure{margin:14px 0}
    .booking-date-time-grid{grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr)}
}

@media (max-width:760px){
    .booking-site-header__inner{min-height:66px}
    .booking-header-badge{display:none}
    .booking-public-wrap{width:min(calc(100% - 20px),680px);padding-top:24px}
    .booking-hero{align-items:flex-start}
    .booking-hero__icon{width:50px;height:50px;flex-basis:50px;border-radius:15px}
    .booking-hero h1{font-size:28px}
    .booking-hero p:last-child{font-size:12px}
    .booking-panel{padding:17px;border-radius:18px}
    .booking-date-time-grid{grid-template-columns:1fr}
    .booking-patient-grid{grid-template-columns:1fr}
    .booking-summary__sticky{display:block;padding:16px;border-radius:18px}
    .booking-summary__secure{margin:14px 0}
    .booking-time-slots{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

@media (max-width:540px){
    body.booking-public-page{background:linear-gradient(180deg,#f8fbff,#f3f8fd)}
    .booking-site-header{position:relative}
    .booking-site-header__inner{width:calc(100% - 24px);min-height:62px}
    .booking-brand{gap:9px}
    .booking-brand__mark{width:39px;height:39px;border-radius:12px}
    .booking-brand__mark svg{width:27px;height:27px}
    .booking-brand__text strong{font-size:13px}
    .booking-brand__text small{font-size:9px}
    .booking-public-wrap{width:calc(100% - 16px);padding:18px 0 28px}
    .booking-hero{margin-bottom:16px}
    .booking-hero__content{gap:10px;align-items:flex-start}
    .booking-hero__icon{width:43px;height:43px;flex-basis:43px;border-radius:13px}
    .booking-hero__icon svg{width:23px;height:23px}
    .booking-hero__eyebrow{font-size:9px}
    .booking-hero h1{font-size:24px}
    .booking-hero p:last-child{font-size:10px;line-height:1.8;margin-top:5px}
    .booking-main{gap:12px}
    .booking-panel{padding:14px;border-radius:16px;box-shadow:0 10px 28px rgba(20,63,111,.06)}
    .booking-section-head{gap:9px;margin-bottom:15px;padding-bottom:12px}
    .booking-section-head__icon{width:36px;height:36px;border-radius:11px}
    .booking-section-head__icon svg{width:19px;height:19px}
    .booking-section-head span{font-size:8px}
    .booking-section-head h2{font-size:15px}
    .booking-field{margin-bottom:13px}
    .booking-field label{font-size:10px;margin-bottom:6px}
    .booking-public-page select,.booking-public-page input,.booking-public-page textarea{min-height:45px;padding:10px 11px;border-radius:11px;font-size:11px}
    .booking-public-page textarea{min-height:82px}
    .booking-doctor-card{padding:11px!important;gap:10px!important;border-radius:14px!important}
    .booking-doctor-card .doctor-preview__photo{width:62px!important;height:62px!important;flex-basis:62px!important}
    .booking-doctor-card .doctor-preview__info strong{font-size:14px!important}
    .booking-doctor-card .doctor-preview__info span{font-size:10px!important}
    .booking-verified{width:26px;height:26px}.booking-verified svg{width:15px;height:15px}
    .booking-service-card{padding:11px;margin-bottom:14px;border-radius:14px}
    .booking-service-card__icon{width:40px;height:40px;flex-basis:40px;border-radius:12px}
    .booking-service-card__icon svg{width:21px;height:21px}
    .booking-service-card strong{font-size:11px}.booking-service-card span{font-size:9px}
    .booking-date-column .availability-calendar{padding:10px;border-radius:14px}
    .booking-date-column .availability-calendar__head{grid-template-columns:36px 1fr 36px;gap:5px}
    .booking-date-column .calendar-nav{height:34px;border-radius:9px}
    .booking-date-column .availability-calendar__head strong{font-size:13px}
    .booking-date-column .availability-calendar__week,.booking-date-column .availability-calendar__days{gap:4px}
    .booking-date-column .availability-calendar__week span{font-size:9px}
    .booking-date-column .calendar-day{border-radius:8px;font-size:10px}
    .booking-date-column .availability-calendar__days{min-height:210px}
    .booking-date-column .availability-calendar__legend{gap:10px;font-size:9px}
    .booking-date-column .calendar-status{font-size:9px}
    .booking-time-slots{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
    .booking-time-slots .slot{min-height:43px;font-size:9px;border-radius:10px!important}
    .booking-empty-state{min-height:100px;font-size:10px}
    .booking-inline-note{font-size:9px;padding:9px}
    .booking-summary{margin-top:1px}
    .booking-summary__sticky{padding:13px}
    .booking-summary__head{padding-bottom:12px}
    .booking-summary__head-icon{width:37px;height:37px;flex-basis:37px;border-radius:11px}
    .booking-summary__head h2{font-size:14px}.booking-summary__head p{font-size:8px}
    .booking-summary__avatar{width:48px;height:48px;flex-basis:48px}
    .booking-summary__doctor strong{font-size:11px}.booking-summary__doctor span{font-size:9px}
    .booking-summary__row{padding:10px 3px;grid-template-columns:30px 1fr}
    .booking-summary__row-icon{width:30px;height:30px;border-radius:9px}.booking-summary__row-icon svg{width:16px;height:16px}
    .booking-summary__row strong{font-size:10px}
    .booking-summary__secure{font-size:8px}
    .booking-primary-btn,.booking-secondary-btn{min-height:46px;border-radius:11px;font-size:11px}
    .booking-summary__hint{font-size:8px}
}

@media (prefers-reduced-motion:reduce){
    .booking-public-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* ------------------------------------------------------------
   Fix v1: selected appointment time must always remain readable.
   Dedicated is-selected state prevents collisions with generic .active rules.
   ------------------------------------------------------------ */
.booking-public-page .booking-time-slots button.slot.is-selected,
.booking-public-page .booking-time-slots button.slot.active[aria-pressed="true"] {
    border-color: #1769d2 !important;
    background: #1769d2 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 8px 18px rgba(23, 105, 210, .24) !important;
}

.booking-public-page .booking-time-slots button.slot.is-selected:hover,
.booking-public-page .booking-time-slots button.slot.is-selected:focus,
.booking-public-page .booking-time-slots button.slot.is-selected:focus-visible,
.booking-public-page .booking-time-slots button.slot.active[aria-pressed="true"]:focus {
    border-color: #0b4f9e !important;
    background: #1769d2 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    outline: 3px solid rgba(23, 105, 210, .14);
    outline-offset: 2px;
}
