/* Bridge for existing (legacy) public pages: their Bootstrap 5 + css/style.css markup is kept
   unchanged and shown inside the Darsgah design. Loaded only by layouts/front_header. */

/* 1. Protect the design chrome from Bootstrap reboot and legacy style.css */
.legacy-page header.masthead { padding: 0; background: var(--night); }
.legacy-page .masthead .nav-link { padding: 0; border: 0; background: none; transition: none; }
.legacy-page .masthead .nav-link:focus:not(:hover):not([aria-current="page"]) { color: #d9e0d3; }
.legacy-page :is(.utility, .masthead, .subhero, .footer, .site-dialog) :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
.legacy-page .footer-links h2 { margin-block-end: 2px; }

/* 2. Legacy content in the design language (English content stays LTR in Urdu mode) */
.legacy-content { direction: ltr; text-align: start; color: var(--body); font-family: var(--sans); }
.legacy-content :is(h1, h2, h3) { font-family: var(--serif); color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
.legacy-content :is(h4, h5, h6, label, legend, th) { color: var(--ink); }
html[data-lang="ur"] .legacy-content :is(h1, h2, h3) { font-family: var(--serif); line-height: 1.15; }
.legacy-content a { color: var(--forest); }
.legacy-content a:hover { color: var(--bronze); }

/* Buttons -> .button--primary */
.legacy-content :is(.btn-primary, .btn-success, .btn-dark, input[type="submit"], button[type="submit"], .but-blue):not(.btn-danger):not(.btn-warning):not(.btn-outline-danger) {
  min-block-size: 47px; padding: 9px 20px; border: 1px solid var(--forest); border-radius: 4px;
  background: var(--forest); color: var(--pale); font: 650 .91rem/1.35 var(--sans); box-shadow: none; cursor: pointer;
}
.legacy-content :is(.btn-primary, .btn-success, .btn-dark, input[type="submit"], button[type="submit"], .but-blue):not(.btn-danger):not(.btn-warning):not(.btn-outline-danger):hover { background: #205448; border-color: #205448; color: var(--pale); }
.legacy-content :is(.btn-secondary, .btn-outline-primary, .btn-light) { border: 1px solid #a88a61; border-radius: 4px; background: transparent; color: var(--forest); }

/* Form fields -> design field */
.legacy-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]), select, textarea, .form-control, .form-select) {
  border: 1px solid #94805d; border-radius: 4px; background-color: var(--card); color: var(--ink); font-family: var(--sans); box-shadow: none;
}
.legacy-content :is(input, select, textarea, .form-control, .form-select):focus { outline: 2px solid #ae824b; outline-offset: 1px; box-shadow: none; border-color: #94805d; }
.legacy-content :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--forest); }

/* Surfaces */
.legacy-content .card { border: 1px solid var(--line); border-radius: 4px; background: var(--card); }

/* 3. Page frame: design paper background (legacy style.css forces #e7ecf2 !important) and footer at the bottom */
body.legacy-page { background-color: var(--paper) !important; display: flex; flex-direction: column; min-block-size: 100vh; }
body.legacy-page > .legacy-content { flex: 1 0 auto; }

/* 4. Page-specific legacy components */
.legacy-content input#iconified { font-family: var(--sans), "FontAwesome", "Font Awesome 6 Free", sans-serif; border-radius: 4px; }
.legacy-content .membership { border: 1px solid var(--line); border-radius: 4px; background: var(--card); box-shadow: var(--shadow); }
.legacy-content .color-gary { background-color: var(--paper); }
.legacy-content form.login { background: transparent; border-radius: 0; box-shadow: none; }
/* ilm-ul-adadat inline CSS has an unused `.footer` rule that would hit the design footer */
body.legacy-page footer.footer { text-align: start; padding: 48px 0 16px; margin-top: 0; background-color: var(--night); border-top: 1px solid #967345; box-shadow: none; }

/* 5. Legacy decorative banners replaced by the design subhero (their text is carried into it) */
.legacy-content :is(.Home-Banner, .courses-banner) { display: none; }

/* 6. Legacy components whose own rules are more specific (IDs, long chains, inline <style>): design colours,
      borders, radius and font only — layout properties are left to the legacy CSS. */
.legacy-content :is(input[type="submit"], button[type="submit"], .submit-btn, .crouse-btn-2, .bg-green, .sub-btn-1):not(.btn-danger):not(.btn-warning):not(.btn-outline-danger) {
  background: var(--forest) !important; color: var(--pale) !important; border-color: var(--forest) !important; border-radius: 4px !important; font-family: var(--sans) !important;
}
.legacy-content :is(input[type="submit"], button[type="submit"], .submit-btn, .crouse-btn-2, .bg-green, .sub-btn-1):not(.btn-danger):not(.btn-warning):not(.btn-outline-danger):hover { background: #205448 !important; }
.legacy-content :is(.crouse-btn-3, .bg-light-blue) { background: transparent !important; color: var(--forest) !important; border: 1px solid #a88a61 !important; border-radius: 4px !important; font-family: var(--sans) !important; }
.legacy-content .bg-dark-blue { background: var(--night) !important; color: var(--pale) !important; border-radius: 4px !important; font-family: var(--sans) !important; }
.legacy-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]), select, textarea) {
  border: 1px solid #94805d !important; border-radius: 4px !important; background-color: var(--card) !important; font-family: var(--sans) !important;
}
.legacy-content input#iconified { font-family: var(--sans), "FontAwesome", "Font Awesome 6 Free", sans-serif !important; }
.legacy-content .book-section :is(h1, h2, h3, h4, h5, h6) { color: var(--ink) !important; font-family: var(--serif) !important; }
.legacy-content .btn-wrap a:not(.bg-dark-blue):not(.bg-green) { background-color: var(--forest) !important; color: var(--pale) !important; border-radius: 4px !important; font-family: var(--sans) !important; }
/* Flex items default to min-width:auto, which would let wide legacy content stretch the page */
body.legacy-page > * { min-inline-size: 0; }
.legacy-content .from-1 { max-inline-size: 100%; box-sizing: border-box; }
/* Booking form: country/payment selects keep desktop inline widths on phones (pre-existing); stack them like other fields */
@media (max-width: 767px) {
  .legacy-content .name-f :is(#country, #payment-method) { width: calc(100% - 5px) !important; margin: 0 0 12px 5px !important; padding-left: 27px !important; font-style: oblique; }
}
/* Signup: decorative "new user?" is a div (one h1 per page); reproduces the rules that matched the former `.sg-rt-ct h1` */
.legacy-content .sg-rt-ct > .sg-rt-ct-title { font-family: var(--serif); font-size: 47px; font-weight: 600; color: var(--ink); text-transform: capitalize; line-height: 0; letter-spacing: -.015em; margin: 115px 0 .5rem 19px; }
html[data-lang="ur"] .legacy-content .sg-rt-ct > .sg-rt-ct-title { line-height: 1.15; letter-spacing: 0; }
