/* Study Tour. All styling here (tailwind.css is precompiled). Bump ?v= by hand only if the server rewrite is removed. */
[class*="studytour-"].hidden{display:none!important}
#studytourView,#studytourFormModal,#studytourTermsModal{--st-blue:#2563eb;--st-text:#111827;--st-muted:#4b5563;--st-border:#d1d5db}
.studytour-header{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.studytour-title{font-size:18px;font-weight:600;color:var(--st-text);margin:0}
.studytour-subtitle{font-size:13px;color:var(--st-muted);margin:2px 0 0}
.studytour-actions{display:flex;flex-wrap:wrap;gap:8px}
.studytour-btn{border:1px solid var(--st-border);background:#fff;color:var(--st-text);border-radius:8px;padding:8px 14px;font-size:13px;font-weight:500;cursor:pointer;min-height:36px}
.studytour-btn:hover{background:#f3f4f6}
.studytour-btn-primary{background:var(--st-blue);border-color:var(--st-blue);color:#fff}
.studytour-btn-primary:hover{background:#1d4ed8}
.studytour-btn:focus-visible,.studytour-input:focus-visible,.studytour-check input:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.studytour-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;align-items:end;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;margin-bottom:18px}
.studytour-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.studytour-field label{font-size:12px;font-weight:600;color:var(--st-muted)}
.studytour-field-search{grid-column:span 2}
.studytour-input{width:100%;border:1px solid var(--st-border);border-radius:10px;padding:8px 10px;font-size:13px;color:var(--st-text);background:#fff;min-height:38px}
.studytour-filter-foot{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:14px}
.studytour-check{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--st-text);cursor:pointer}
.studytour-count{font-size:13px;color:var(--st-muted);margin-left:auto}
.studytour-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}
.studytour-card{display:flex;flex-direction:column;text-align:left;background:#fff;border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;cursor:pointer;padding:0;font:inherit;color:inherit;box-shadow:0 2px 8px -2px rgba(17,24,39,.12);transition:transform .18s ease,box-shadow .18s ease}
.studytour-card:hover{transform:scale(1.02);box-shadow:0 12px 24px -8px rgba(17,24,39,.25)}
.studytour-card:focus-visible{outline:3px solid var(--st-blue);outline-offset:2px}
.studytour-card.is-archived{opacity:.65}
.studytour-cover{position:relative;display:block;width:100%;aspect-ratio:4/5;background:#e5e7eb;overflow:hidden}
.studytour-cover-img{width:100%;height:100%;object-fit:cover;display:block}
.studytour-cover-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:16px;text-align:center;background:#eef2f7;color:#374151;font-weight:600;font-size:14px;overflow:hidden}
.studytour-badges{position:absolute;left:8px;top:8px;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.studytour-badge{font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;background:#fff;color:#374151;border:1px solid #d1d5db}
.studytour-badge-closed{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.studytour-badge-archived{background:#f3f4f6;color:#374151}
.studytour-card-body{display:flex;flex-direction:column;gap:8px;padding:12px 14px 14px}
.studytour-card-title{font-size:14.5px;font-weight:700;color:var(--st-text);line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.studytour-chips{display:flex;flex-wrap:wrap;gap:6px}
.studytour-chip{font-size:11.5px;font-weight:500;padding:2px 9px;border-radius:999px;background:#f3f4f6;color:#374151}
.studytour-chip-country{background:#eff6ff;color:#1d4ed8}
.studytour-meta{font-size:12px;color:var(--st-muted);line-height:1.4}
.studytour-skeleton{border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;background:#fff}
.studytour-skeleton-cover{aspect-ratio:4/5;background:#e5e7eb;animation:studytour-pulse 1.4s ease-in-out infinite}
.studytour-skeleton-line{height:12px;margin:12px 14px 0;border-radius:6px;background:#e5e7eb;animation:studytour-pulse 1.4s ease-in-out infinite}
.studytour-skeleton-line.short{width:55%;margin-bottom:14px}
@keyframes studytour-pulse{0%,100%{opacity:1}50%{opacity:.5}}
.studytour-empty,.studytour-noresult,.studytour-error{text-align:center;background:#fff;border:1px dashed var(--st-border);border-radius:14px;padding:40px 16px}
.studytour-error{border-color:#fecaca}
.studytour-state-title{font-size:15px;font-weight:600;color:var(--st-text);margin:0 0 4px}
.studytour-state-text{font-size:13px;color:var(--st-muted);margin:0 0 14px}
#studytourView .studytour-btn-danger{color:#b91c1c;border-color:#fca5a5}
.studytour-btn-danger:hover{background:#fef2f2}
.studytour-btn:disabled{opacity:.6;cursor:default}
.studytour-detail{max-width:860px;margin:0 auto}
.studytour-detail-bar{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;margin-bottom:16px}
.studytour-detail-title{font-size:22px;line-height:1.25;font-weight:700;color:var(--st-text);margin:0 0 10px;overflow-wrap:anywhere}
.studytour-badges-inline{display:flex;gap:6px;margin-bottom:8px}
.studytour-posted{font-size:13px;color:var(--st-muted);margin:10px 0 0}
.studytour-quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:16px 0 0;padding:14px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:14px}
.studytour-quick dt,.studytour-rows dt{font-size:12px;font-weight:600;color:var(--st-muted)}
.studytour-quick dd,.studytour-rows dd{margin:2px 0 0;font-size:14px;color:var(--st-text);overflow-wrap:anywhere}
.studytour-sec{margin-top:24px}
.studytour-sec-title{font-size:16px;font-weight:700;color:var(--st-text);margin:0 0 8px}
.studytour-rich{font-size:14px;line-height:1.6;color:var(--st-text);overflow-wrap:anywhere}
.studytour-sub{margin-top:14px}
.studytour-sub h4{font-size:13px;font-weight:700;color:var(--st-text);margin:0 0 6px}
.studytour-rows{display:grid;gap:10px}
.studytour-list{list-style:disc;padding-left:22px;margin:0;font-size:14px;line-height:1.6;color:var(--st-text);overflow-wrap:anywhere}
.studytour-posters{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.studytour-poster{margin:0}
.studytour-poster img{width:100%;height:auto;display:block;border-radius:14px;border:1px solid #e5e7eb}
.studytour-poster figcaption{font-size:12px;color:var(--st-muted);margin-top:4px;overflow-wrap:anywhere}
.studytour-detail-loading{padding:24px 0}
.studytour-terms-box{max-width:720px}
.studytour-terms-body{margin:10px 0;max-height:55vh;overflow-y:auto}
.studytour-terms-actions{justify-content:flex-end;margin-top:12px}
.studytour-form-error{font-size:13px;color:#b91c1c;margin:8px 0 0}
@media (max-width:640px){
  .studytour-posters{grid-template-columns:1fr}
  .studytour-grid{grid-template-columns:1fr}
  .studytour-filters{grid-template-columns:1fr}
  .studytour-field-search{grid-column:auto}
  .studytour-input,.studytour-btn{min-height:40px}
  .studytour-count{margin-left:0}
}
@media (prefers-reduced-motion:reduce){
  .studytour-card{transition:none}
  .studytour-card:hover{transform:none}
  .studytour-skeleton-cover,.studytour-skeleton-line{animation:none}
}

/* ---------- Add / edit form ---------- */
.studytour-form-box{max-width:880px;padding:0;display:flex;flex-direction:column;max-height:92vh;overflow:hidden}
.studytour-form-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid #e5e7eb}
.studytour-form-heading{font-size:18px;font-weight:700;color:var(--st-text,#111827);margin:0}
.studytour-form-x{font-size:20px;line-height:1;padding:4px 12px}
.studytour-form-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:8px 20px 20px}
.studytour-form-foot{border-top:1px solid #e5e7eb;padding:12px 20px;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:flex-end;background:#fff}
.studytour-form-foot .studytour-form-error{margin:0 auto 0 0;flex:1 1 240px}
.studytour-form-sec{margin-top:20px}
.studytour-form-sectitle{font-size:15px;font-weight:700;color:#111827;margin:0 0 10px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}
.studytour-form-subtitle{font-size:13px;font-weight:700;color:#111827;margin:0 0 6px}
.studytour-form-sub{margin-top:16px}
.studytour-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.studytour-field-wide{grid-column:1/-1}
.studytour-label,.studytour-group legend{font-size:12px;font-weight:600;color:#4b5563;padding:0}
.studytour-group{border:0;margin:0;padding:0;min-width:0}
.studytour-group legend{margin-bottom:6px}
.studytour-checks{display:flex;flex-wrap:wrap;gap:8px 18px}
.studytour-hint{font-size:12px;color:#4b5563;margin:2px 0 0}
.studytour-field-error{font-size:12.5px;color:#b91c1c;margin:2px 0 0}
.studytour-input.has-error{border-color:#b91c1c}
.studytour-input[type=date]{min-width:0}
.studytour-rows-wrap{display:grid;gap:10px}
.studytour-row{display:grid;gap:10px;align-items:start;padding:10px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb}
.studytour-row-details{grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto}
.studytour-row-fees{grid-template-columns:110px minmax(0,1fr) minmax(0,2fr) auto}
.studytour-row-list{grid-template-columns:minmax(0,1fr) auto}
.studytour-row-remove{align-self:start;margin-top:22px}
.studytour-add-row{margin-top:10px}
.studytour-form-box .rte-wrap{max-width:100%}
.studytour-form-box .rte-editor{min-height:110px;max-height:260px;overflow:auto;padding:8px 10px;font-size:14px}
.studytour-form-box .rte-toolbar{flex-wrap:wrap}
@media (max-width:640px){
  .studytour-form-grid{grid-template-columns:minmax(0,1fr)}
  .studytour-row-details,.studytour-row-fees,.studytour-row-list{grid-template-columns:minmax(0,1fr)}
  .studytour-row-remove{margin-top:0;justify-self:start}
  .studytour-form-head,.studytour-form-body,.studytour-form-foot{padding-left:16px;padding-right:16px}
}
.studytour-group .studytour-check{font-weight:400;white-space:nowrap;flex:0 0 auto}
.studytour-form-box .studytour-field label.studytour-check{font-size:13px;color:#111827;font-weight:400}
.studytour-form-box .studytour-check input{flex:0 0 auto}
.studytour-form-box input[type=checkbox]{width:auto;min-height:0;height:auto;margin:0;padding:0;flex:0 0 auto}

/* --- poster section of the form --- */
.studytour-poster-list{display:grid;gap:10px}
.studytour-poster-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:12px;align-items:start;padding:10px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb}
.studytour-poster-thumb{width:72px;aspect-ratio:4/5;border-radius:8px;overflow:hidden;background:#e5e7eb}
.studytour-poster-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.studytour-poster-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:4px;text-align:center;font-size:11px;color:#374151;background:#eef2f7}
.studytour-poster-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:22px}
.studytour-poster-add{margin-top:10px}
.studytour-poster-add[hidden]{display:none}
@media (max-width:640px){
  .studytour-poster-row{grid-template-columns:56px minmax(0,1fr)}
  .studytour-poster-thumb{width:56px}
  .studytour-poster-actions{grid-column:1/-1;margin-top:0}
}

/* ---------- Audit fixes ---------- */
.studytour-rich p{margin:0 0 .75em}
.studytour-rich p:last-child{margin-bottom:0}
.studytour-rich ul,.studytour-rich ol{margin:.5em 0 .75em;padding-left:22px}
.studytour-rich ul{list-style:disc}
.studytour-rich ol{list-style:decimal}
.studytour-rich li+li{margin-top:2px}
.studytour-filter-foot .studytour-check{white-space:nowrap;flex:0 0 auto}
.studytour-detail-bar .studytour-form-error{flex:1 0 100%;margin:0}
.studytour-poster-fallback-lg{height:auto;aspect-ratio:4/5;border-radius:14px;border:1px solid #e5e7eb;font-size:13px}
/* contrast (>= 4.5:1): placeholders and disabled controls keep readable text instead of fading with opacity */
.studytour-input::placeholder{color:#6b7280;opacity:1}
#studytourFormModal .rte-editor:empty::before,#studytourTermsModal .rte-editor:empty::before{color:#6b7280}
.studytour-btn:disabled{opacity:1;color:#5f6673;background:#f3f4f6;border-color:#d1d5db}
.studytour-btn-primary:disabled{color:#fff;background:#64748b;border-color:#64748b}
#studytourView .studytour-btn-danger:disabled{color:#5f6673;border-color:#d1d5db}
