/* ================================================================
   TM-HOTELS.CSS — واجهة البحث والحجز للفنادق (بأسلوب Agoda / Trip)
   يُحمَّل في صفحات الفنادق فقط، ويعتمد على متغيرات tm-ui.css
   ================================================================ */
/* HERO + SEARCH */
.th-hero{background:radial-gradient(800px 380px at 85% 0%,rgba(56,189,248,.3),transparent 60%),linear-gradient(135deg,var(--tm-navy-950),var(--tm-navy-800) 60%,var(--tm-navy-700));color:#fff;padding:30px 0 34px}
.th-hero h1{color:#fff!important;font-size:clamp(24px,3.4vw,38px);font-weight:900}
.th-hero p{color:rgba(255,255,255,.78);margin:4px 0 20px!important}
.th-search{display:grid;grid-template-columns:1.6fr 1fr 1fr 1.2fr auto;background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(5,20,40,.28);padding:6px;gap:0;position:relative;color:var(--tm-ink)}
.th-search--compact{grid-template-columns:1fr 1fr 1.2fr auto;box-shadow:none;border:1.5px solid var(--tm-line-2)}
.th-search__f{position:relative;padding:8px 14px;border-inline-start:1px solid var(--tm-line);display:flex;flex-direction:column;justify-content:center;min-width:0}
.th-search__f:first-child{border-inline-start:0}
.th-search__f label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:var(--tm-muted);margin-bottom:2px}
.th-search__f label .tm-ico{color:var(--tm-sky-500)}
.th-search__f input{border:0;outline:0;background:transparent;font:inherit;font-size:15.5px;font-weight:800;color:var(--tm-navy-900);width:100%;padding:2px 0;min-height:28px}
.th-search__f input::placeholder{color:#9AB0C7;font-weight:600}
.th-search__f input[type=date]{direction:rtl;cursor:pointer}
.th-search__f:focus-within{background:var(--tm-sky-50);border-radius:12px}
.th-nights{position:absolute;top:8px;left:10px;font-size:11px;font-weight:800;color:var(--tm-sky-700);background:var(--tm-sky-50);border:1px solid var(--tm-sky-100);border-radius:99px;padding:1px 8px}
.th-nights:empty{display:none}
.th-guests-btn{border:0;background:transparent;font:inherit;font-size:15px;font-weight:800;color:var(--tm-navy-900);text-align:right;cursor:pointer;padding:2px 0;min-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-guests-pop[hidden]{display:none!important}
.th-guests-pop{position:absolute;top:calc(100% + 10px);inset-inline-end:0;z-index:50;width:min(320px,90vw);background:#fff;border:1px solid var(--tm-line);border-radius:16px;box-shadow:var(--tm-sh-3);padding:14px;display:grid;gap:12px}
.th-step-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.th-step-row b{display:block;font-size:14.5px;color:var(--tm-navy-900)}
.th-step-row small{display:block;font-size:12px;color:var(--tm-muted)}
.th-stepper{display:flex;align-items:center;gap:6px}
.th-stepper button{width:36px;height:36px;border-radius:50%;border:1.5px solid var(--tm-line-2);background:#fff;color:var(--tm-sky-700);font-size:20px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.th-stepper button:hover:not(:disabled){border-color:var(--tm-sky-500);background:var(--tm-sky-50)}
.th-stepper button:disabled{opacity:.35;cursor:default}
.th-stepper input{width:34px;text-align:center;border:0;font:inherit;font-weight:900;font-size:16px;color:var(--tm-navy-900);background:transparent;-moz-appearance:textfield}
.th-stepper input::-webkit-inner-spin-button{display:none}
.th-search__go{border-radius:14px!important;padding:0 26px!important;min-height:58px;font-size:16px!important}
.th-err{display:flex;align-items:center;gap:6px;color:#B91C1C;font-weight:700;font-size:14px;margin-top:10px!important}
.th-err--light{color:#FECACA}

/* STEPS */
.th-steps{list-style:none;margin:22px 0 18px;padding:0;display:flex;gap:6px;counter-reset:s;overflow-x:auto;scrollbar-width:none}
.th-steps::-webkit-scrollbar{display:none}
.th-steps li{flex:1;min-width:110px;display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:12px;background:#fff;border:1px solid var(--tm-line);color:var(--tm-muted);font-size:13px;white-space:nowrap}
.th-steps li span{width:24px;height:24px;border-radius:50%;background:var(--tm-bg);border:1.5px solid var(--tm-line-2);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:12px;flex-shrink:0}
.th-steps li b{font-weight:800}
.th-steps li.is-on{border-color:var(--tm-sky-400);background:var(--tm-sky-50);color:var(--tm-sky-700)}
.th-steps li.is-on span{background:var(--tm-sky-600);border-color:var(--tm-sky-600);color:#fff}
.th-steps li.is-done{color:var(--tm-ok)}
.th-steps li.is-done span{background:#DCFCE7;border-color:#86EFAC;color:var(--tm-ok)}

/* RESULTS */
.th-results-wrap{padding-bottom:70px}
.th-citybar{padding-top:0;margin-bottom:6px}
.th-results-wrap .tm-hlayout{margin-top:14px}
.th-resbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.th-resbar__r{display:flex;gap:8px;align-items:center}
.th-sort .tm-input{height:42px;min-width:180px;font-size:14px}
.th-hint{display:flex;align-items:center;gap:10px;background:var(--tm-sky-50);border:1px solid var(--tm-sky-100);color:var(--tm-sky-700);border-radius:14px;padding:12px 14px;font-weight:700;font-size:14px;margin-bottom:14px}
.th-list{display:grid;gap:16px}
.th-card{display:grid;grid-template-columns:280px minmax(0,1fr) 210px;background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r-lg);overflow:hidden;box-shadow:var(--tm-sh-1);transition:box-shadow .25s,border-color .25s,transform .25s}
.th-card:hover{box-shadow:var(--tm-sh-3);border-color:var(--tm-sky-200);transform:translateY(-2px)}
.th-card.is-off{opacity:.78}
.th-card__img{position:relative;display:block}
.th-card__img .tm-media{height:100%;min-height:210px;aspect-ratio:auto!important}
.th-card:hover .tm-media.tm-fit-cover img{transform:scale(1.05)}
.th-card__body{padding:16px 18px;display:flex;flex-direction:column;gap:8px;min-width:0}
.th-card__title{font-size:18px;font-weight:900;line-height:1.4}
.th-card__title a:hover{color:var(--tm-sky-700)}
.th-card__room{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:13px;color:var(--tm-ink-2);padding-top:8px;border-top:1px dashed var(--tm-line)}
.th-card__room b{color:var(--tm-navy-900)}
.th-card__room span{display:inline-flex;align-items:center;gap:4px}
.is-good{color:var(--tm-ok)!important;font-weight:700}
.is-warn{color:#B45309!important;font-weight:700}
.th-card__side{padding:16px;border-inline-start:1px solid var(--tm-line);display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;gap:12px;background:linear-gradient(180deg,#fff,var(--tm-sky-50))}
.th-card__side .tm-score{flex-direction:row-reverse;text-align:left}
.th-card__side .tm-score small{display:block;max-width:110px;line-height:1.3}
.th-card__price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;width:100%;text-align:left}
.th-card__price small{font-size:12px;color:var(--tm-muted);font-weight:700;text-align:left}
.th-card__price del{font-size:13px;color:var(--tm-muted)}
.th-card__price strong{font-family:var(--tm-font-h);font-size:24px;font-weight:900;color:var(--tm-sky-700);line-height:1.2}
.th-card__price span{font-size:12px;color:var(--tm-muted);margin-bottom:8px}
.th-card__price .tm-btn{margin-top:6px}

/* AVAILABILITY */
.th-av{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:800;border-radius:9px;padding:5px 10px;width:fit-content}
.th-av--ok{background:#F0FDF4;color:var(--tm-ok);border:1px solid #BBF7D0}
.th-av--few{background:#FFF7ED;color:#C2410C;border:1px solid #FED7AA}
.th-av--req{background:var(--tm-sky-50);color:var(--tm-sky-700);border:1px solid var(--tm-sky-100)}
.th-av--no{background:#FEF2F2;color:#B91C1C;border:1px solid #FECACA}

/* DETAIL */
.th-detail .tm-detail__head{align-items:flex-start}
.th-head-price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;background:#fff;border:1px solid var(--tm-line);border-radius:16px;padding:12px 16px;box-shadow:var(--tm-sh-1);text-align:left}
.th-head-price small{font-size:12px;color:var(--tm-muted);font-weight:700}
.th-head-price strong{font-family:var(--tm-font-h);font-size:24px;color:var(--tm-sky-700);font-weight:900}
.th-head-price .tm-btn{margin-top:6px;padding:9px 16px}
.th-tabs{position:sticky;top:74px;z-index:20;display:flex;gap:4px;overflow-x:auto;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border:1px solid var(--tm-line);border-radius:14px;padding:6px;margin:18px 0;scrollbar-width:none}
.th-tabs::-webkit-scrollbar{display:none}
.th-tabs a{padding:9px 14px;border-radius:10px;font-weight:800;font-size:14px;color:var(--tm-ink-2);white-space:nowrap}
.th-tabs a:hover{background:var(--tm-sky-50);color:var(--tm-sky-700)}
.th-datebar{background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r-lg);padding:16px;box-shadow:var(--tm-sh-1);scroll-margin-top:140px}
.th-datebar__t{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.th-datebar__t>.tm-ico{color:var(--tm-sky-600)}
.th-datebar__t b{display:block;color:var(--tm-navy-900);font-size:16px}
.th-datebar__t small{color:var(--tm-muted);font-size:13px}
.th-h2{display:flex;align-items:center;gap:9px;font-size:22px;font-weight:900;margin:28px 0 14px!important}
.th-h2 .tm-ico{color:var(--tm-sky-500)}
.th-rooms{scroll-margin-top:140px}
.th-room{display:grid;grid-template-columns:minmax(0,1.6fr) 1fr 220px;gap:18px;align-items:center;background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r-lg);padding:18px;margin-bottom:12px;box-shadow:var(--tm-sh-1);transition:border-color .2s}
.th-room:hover{border-color:var(--tm-sky-200)}
.th-room.is-off{background:#FBFCFE;opacity:.8}
.th-room h3{font-size:17.5px;font-weight:900;margin-bottom:8px!important}
.th-feats{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13.5px;color:var(--tm-ink-2)}
.th-feats li{display:inline-flex;align-items:center;gap:5px}
.th-feats .tm-ico{color:var(--tm-sky-500)}
.th-feats li.is-good .tm-ico{color:var(--tm-ok)}
.th-feats li.is-warn .tm-ico{color:#B45309}
.th-muted{color:var(--tm-muted);font-size:13.5px;margin-top:6px!important}
.th-room__price{display:flex;flex-direction:column;gap:2px;border-inline-start:1px dashed var(--tm-line);padding-inline-start:18px}
.th-room__price small{font-size:12px;color:var(--tm-muted);font-weight:700}
.th-room__price strong{font-family:var(--tm-font-h);font-size:23px;font-weight:900;color:var(--tm-sky-700);line-height:1.2}
.th-room__price span{font-size:12px;color:var(--tm-muted)}
.th-room__cta{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.th-room__cta .th-av{width:auto;justify-content:center}
.th-note{display:flex;align-items:center;gap:8px;color:var(--tm-muted);font-size:13px;margin-top:10px!important}
.th-note .tm-ico{color:var(--tm-sky-500)}

/* BOOKING */
.th-book{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start}
.th-form h2{font-size:19px;font-weight:900;display:flex;align-items:center;gap:8px;margin-bottom:14px!important}
.th-form h2 .tm-ico{color:var(--tm-sky-500)}
.th-alert{display:flex;gap:10px;align-items:flex-start;background:#FEF2F2;border:1px solid #FECACA;color:#991B1B;border-radius:12px;padding:12px 14px;margin-bottom:14px;font-size:14px;font-weight:700}
.th-agree{display:flex;gap:10px;align-items:flex-start;margin-top:16px;font-size:14px;color:var(--tm-ink-2);cursor:pointer}
.th-agree input{width:18px;height:18px;margin-top:4px;accent-color:var(--tm-sky-600);flex-shrink:0}
.th-agree a{color:var(--tm-sky-700);font-weight:700;text-decoration:underline}
.th-sum{position:sticky;top:96px;background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r-xl);box-shadow:var(--tm-sh-2);padding:16px;display:grid;gap:12px}
.th-sum__hotel{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:center}
.th-sum__hotel .tm-media{border-radius:12px}
.th-sum__hotel b{display:block;color:var(--tm-navy-900);font-size:15.5px;line-height:1.4}
.th-sum__hotel small{display:flex;align-items:center;gap:4px;color:var(--tm-muted);font-size:12.5px}
.th-sum__dates{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.th-sum__dates>div{background:var(--tm-sky-50);border:1px solid var(--tm-sky-100);border-radius:12px;padding:10px}
.th-sum__dates small{display:block;font-size:11.5px;color:var(--tm-muted);font-weight:700}
.th-sum__dates b{display:block;font-size:13.5px;color:var(--tm-navy-900);line-height:1.4}
.th-sum__dates span{font-size:12px;color:var(--tm-sky-700)}
.th-sum__list{list-style:none;padding:0;margin:0;display:grid}
.th-sum__list li{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed var(--tm-line);font-size:14px}
.th-sum__list span{color:var(--tm-muted)}
.th-sum__list b{color:var(--tm-navy-900);text-align:left}
.th-sum__nights{font-size:13.5px;border:1px solid var(--tm-line);border-radius:12px;padding:10px 12px}
.th-sum__nights summary{cursor:pointer;font-weight:800;color:var(--tm-sky-700)}
.th-sum__nights div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid var(--tm-bg);color:var(--tm-ink-2)}
.th-sum__nights em{font-style:normal;font-size:11px;background:#FFF7ED;color:#C2410C;border-radius:6px;padding:0 6px;margin-inline-start:4px}
.th-sum__total{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--tm-navy-900);color:#fff;border-radius:14px;padding:14px 16px}
.th-sum__total strong{font-family:var(--tm-font-h);font-size:24px;font-weight:900;color:#fff}

/* DONE */
.th-done{max-width:760px;margin:10px auto 40px;background:#fff;border:1px solid var(--tm-line);border-radius:var(--tm-r-xl);box-shadow:var(--tm-sh-2);padding:34px 28px;text-align:center}
.th-done__ic{width:84px;height:84px;margin:0 auto 14px;border-radius:50%;background:#DCFCE7;color:var(--tm-ok);display:flex;align-items:center;justify-content:center}
.th-done h1{font-size:clamp(22px,3vw,30px);font-weight:900}
.th-done>p{color:var(--tm-ink-2);margin-top:8px!important}
.th-done__ref{display:inline-flex;align-items:center;gap:12px;margin:18px auto;background:var(--tm-sky-50);border:1.5px dashed var(--tm-sky-300);border-radius:14px;padding:10px 16px}
.th-done__ref small{color:var(--tm-muted);font-weight:700}
.th-done__ref b{font-family:monospace;font-size:22px;letter-spacing:2px;color:var(--tm-navy-900)}
.th-done__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;text-align:right;margin:8px 0 20px}
.th-done__grid>div{background:var(--tm-bg);border:1px solid var(--tm-line);border-radius:12px;padding:10px 12px}
.th-done__grid small{display:block;font-size:12px;color:var(--tm-muted);font-weight:700}
.th-done__grid b{color:var(--tm-navy-900);font-size:14px}
.th-done__btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* RESPONSIVE */
@media (max-width:1100px){
  .th-search{grid-template-columns:1fr 1fr;gap:4px}
  .th-search__dest{grid-column:1/-1}
  .th-search__f{border:1px solid var(--tm-line)!important;border-radius:12px}
  .th-search__guests{grid-column:1/-1}
  .th-search__go{grid-column:1/-1;min-height:52px}
  .th-search--compact{grid-template-columns:1fr 1fr}
  .th-card{grid-template-columns:240px minmax(0,1fr)}
  .th-card__side{grid-column:1/-1;flex-direction:row;align-items:center;border-inline-start:0;border-top:1px solid var(--tm-line)}
  .th-card__price{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px 10px}
  .th-card__price .tm-btn{width:auto;margin:0}
  .th-card__price span{margin:0}
  .th-room{grid-template-columns:minmax(0,1fr) 200px}
  .th-room__price{border:0;padding:0}
  .th-room__cta{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;border-top:1px dashed var(--tm-line);padding-top:12px}
  .th-book{grid-template-columns:1fr}
  .th-sum{position:relative;top:0;order:-1}
  .th-tabs{top:66px}
}
@media (max-width:640px){
  .th-hero{padding:20px 0 24px}
  .th-search__f{padding:8px 12px}
  .th-search__f input{font-size:15px}
  .th-card{grid-template-columns:1fr}
  .th-card__img .tm-media{min-height:0;aspect-ratio:16/10!important}
  .th-card__side{flex-direction:column;align-items:stretch}
  .th-card__side .tm-score{align-self:flex-start;flex-direction:row}
  .th-card__price{align-items:flex-start;text-align:right;justify-content:flex-start}
  .th-card__price .tm-btn{width:100%}
  .th-room{grid-template-columns:1fr;padding:14px}
  .th-room__cta .tm-btn{flex:1}
  .th-head-price{width:100%;align-items:flex-start;text-align:right}
  .th-steps li{min-width:auto;padding:7px 9px}
  .th-steps li b{display:none}
  .th-steps li.is-on b{display:inline}
  .th-done{padding:24px 16px}
  .th-done__grid{grid-template-columns:1fr 1fr}
  .th-sort .tm-input{min-width:0}
  .th-resbar__r{width:100%}
  .th-resbar__r .th-sort{flex:1}
  .th-resbar__r .th-sort select{width:100%}
}
