/* =====================================================
   BOOTSTRAP BRIDGE  (loaded after Bootstrap, before theme CSS)
   -----------------------------------------------------
   1. Maps Bootstrap 5 design tokens to the Legal Desk BD palette,
      so every Bootstrap component / utility (btn, badge, alert,
      text-bg-*, border-*, etc.) is automatically on-brand.
   2. Neutralises Bootstrap "reboot" rules that would otherwise
      change the spacing of the existing theme templates.
===================================================== */

:root,
[data-bs-theme="light"] {

    /* Brand palette -> Bootstrap theme colours */
    --bs-primary: #0b2545;
    --bs-primary-rgb: 11, 37, 69;
    --bs-secondary: #c69a3a;
    --bs-secondary-rgb: 198, 154, 58;
    --bs-success: #1f7a5a;
    --bs-success-rgb: 31, 122, 90;
    --bs-info: #2b5a94;
    --bs-info-rgb: 43, 90, 148;
    --bs-warning: #e3bd5f;
    --bs-warning-rgb: 227, 189, 95;
    --bs-danger: #c0392b;
    --bs-danger-rgb: 192, 57, 43;
    --bs-light: #f6f8fc;
    --bs-light-rgb: 246, 248, 252;
    --bs-dark: #061629;
    --bs-dark-rgb: 6, 22, 41;

    --bs-primary-text-emphasis: #061629;
    --bs-primary-bg-subtle: #e3eaf5;
    --bs-primary-border-subtle: #b7c7e0;

    /* Body */
    --bs-body-font-family: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-body-color: #14213d;
    --bs-body-color-rgb: 20, 33, 61;
    --bs-body-bg: #f6f8fc;
    --bs-body-bg-rgb: 246, 248, 252;
    --bs-heading-color: inherit;
    --bs-emphasis-color: #061629;
    --bs-secondary-color: #586174;
    --bs-border-color: #e0e5ef;
    --bs-link-color: #0b2545;
    --bs-link-color-rgb: 11, 37, 69;
    --bs-link-hover-color: #9a741f;
    --bs-link-hover-color-rgb: 154, 116, 31;
    --bs-link-decoration: none;

    --bs-border-radius: 10px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-lg: 14px;
    --bs-border-radius-xl: 20px;
    --bs-border-radius-pill: 999px;
    --bs-box-shadow: 0 18px 48px rgba(11, 37, 69, 0.10);
    --bs-box-shadow-sm: 0 4px 14px rgba(11, 37, 69, 0.07);
    --bs-box-shadow-lg: 0 24px 60px rgba(11, 37, 69, 0.16);
    --bs-focus-ring-color: rgba(198, 154, 58, 0.35);
}


/* -----------------------------------------------------
   Reboot neutralisation (keep the original template spacing)
----------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
p, dl, dd, figure, blockquote, pre, address, fieldset {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding-left: 0;
}

ul ul, ol ol, ul ol, ol ul {
    margin: 0;
}

/* Bootstrap resets heading sizes to a fluid scale; restore the
   browser scale the templates were built against. Individual
   components set their own sizes, and redesign.css refines them. */
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.17em; }
h4 { font-size: 1em; }
h5 { font-size: .83em; }
h6 { font-size: .67em; }

legend {
    float: none;
    width: auto;
    padding: 0;
    margin: 0;
    font-size: inherit;
}

legend + * {
    clear: none;
}

label {
    margin: 0;
}

address {
    font-style: normal;
}

/* Links: Bootstrap underlines on hover - the theme never does */
a:hover {
    color: inherit;
    text-decoration: none;
}

/* Bootstrap grid container -> theme container */
.container {
    --bs-gutter-x: 0;
    max-width: var(--container, 1200px);
    padding-inline: 0;
}

.lead {
    font-weight: inherit;
}

/* Bootstrap nav-link (added to the primary menu by functions.php) */
.nav-link {
    --bs-nav-link-padding-x: 0;
    --bs-nav-link-padding-y: 0;
    --bs-nav-link-color: inherit;
    --bs-nav-link-hover-color: var(--accent-light, #e3bd5f);
    --bs-nav-link-font-size: inherit;
    --bs-nav-link-font-weight: inherit;
}

/* Bootstrap buttons used by the theme: give every state a colour */
.btn {
    --bs-btn-font-family: inherit;
    --bs-btn-color: var(--primary, #0b2545);
    --bs-btn-hover-color: var(--primary, #0b2545);
    --bs-btn-active-color: var(--primary, #0b2545);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    --bs-btn-border-radius: var(--radius, 10px);
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(198, 154, 58, 0.35);
}

.btn-primary,
.btn-header {
    --bs-btn-color: var(--primary, #0b2545);
    --bs-btn-bg: var(--accent, #c69a3a);
    --bs-btn-border-color: var(--accent, #c69a3a);
    --bs-btn-hover-color: var(--primary, #0b2545);
    --bs-btn-hover-bg: var(--accent-light, #e3bd5f);
    --bs-btn-hover-border-color: var(--accent-light, #e3bd5f);
    --bs-btn-active-color: var(--primary, #0b2545);
    --bs-btn-active-bg: var(--accent-light, #e3bd5f);
    --bs-btn-active-border-color: var(--accent-light, #e3bd5f);
}

.btn-outline-light {
    --bs-btn-color: #ffffff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.5);
    --bs-btn-hover-color: var(--primary, #0b2545);
    --bs-btn-hover-bg: #ffffff;
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-active-color: var(--primary, #0b2545);
    --bs-btn-active-bg: #ffffff;
    --bs-btn-active-border-color: #ffffff;
}
