/* =========================================================
   NubiBooks overrides. LOAD THIS FILE LAST.
   Owner rules: no square corners anywhere, NubiBooks green
   focus ring (never Flowbite blue).
   Selectors are deliberately stronger than Flowbite's
   [type='search'], [type='text'] ... base reset.
   ========================================================= */

/* 1. Round every input, select, textarea and button (8px) */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.rounded-full):not(.rounded-e-none):not(.rounded-s-none),
select:not(.rounded-full):not(.rounded-e-none):not(.rounded-s-none),
textarea:not(.rounded-e-none):not(.rounded-s-none),
button:not(.rounded-full):not(.rounded-xl):not(.rounded-2xl):not(.rounded-e-none):not(.rounded-s-none) {
    border-radius: 8px;
}

/* 2. Joined groups (search box + Search button): round only the outer side */
input.rounded-e-none, select.rounded-e-none, button.rounded-e-none {
    border-radius: 8px 0 0 8px;
}
input.rounded-s-none, select.rounded-s-none, button.rounded-s-none {
    border-radius: 0 8px 8px 0;
}

/* 3. Input border colour */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select,
textarea {
    border-color: #CDD6C5;
}

/* 4. Focus: NubiBooks green, not Flowbite blue */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
select:not([multiple]):focus,
textarea:not([readonly]):focus {
    outline: none;
    border-color: #314025;
    --tw-ring-color: #E3EEDA;
    box-shadow: 0 0 0 3px #E3EEDA;
}

/* 5. Checkboxes and radios in brand green */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #314025;
    color: #314025;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
    --tw-ring-color: #E3EEDA;
}

/* 6. Lane QF2 item 12. ONE global focus rule for every focusable element so Flowbite's default
   blue ring and any `focus:ring-neutral-tertiary` / `focus:ring-primary-*` utility that resolves
   to nothing never paints over the brand. Covers buttons, anchor tags, role-* widgets and the
   Flowbite dropdown / modal / tab triggers. The ring is the brand's mint wash (#E3EEDA at 3px)
   with the forest border (#314025) so keyboard navigation reads as "NubiBooks", never "web form". */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible,
[data-dropdown-toggle]:focus-visible,
[data-modal-toggle]:focus-visible,
[data-tooltip-target]:focus-visible,
[data-collapse-toggle]:focus-visible {
    outline: 2px solid #314025 !important;
    outline-offset: 2px !important;
    --tw-ring-color: #E3EEDA !important;
    box-shadow: 0 0 0 3px #E3EEDA !important;
}

/* Belt-and-braces: any element that Flowbite or Tailwind's base layer leaves on `:focus` (not
   :focus-visible, e.g. older browsers / Flowbite v2 triggers) also picks up the brand ring. */
.focus\:ring-blue-300:focus,
.focus\:ring-blue-500:focus,
.focus\:ring-blue-700:focus,
.focus\:ring-primary-300:focus,
.focus\:ring-primary-500:focus,
.focus\:ring-primary-700:focus {
    --tw-ring-color: #E3EEDA !important;
    box-shadow: 0 0 0 3px #E3EEDA !important;
    border-color: #314025 !important;
}