@tailwind base;
@tailwind components;
@tailwind utilities;

/* UK Government (GDS) Design System Overrides */

@layer base {

    /* 1. Global text scaling. Base 16px -> 18px */
    html {
        font-size: 112.5%;
    }

    /* 2. Strict Focus States (Thick Yellow + Black inner ring) */
    *:focus,
    *:focus-visible {
        outline: 3px solid #fd0 !important;
        /* GDS Yellow */
        outline-offset: 0 !important;
        box-shadow: inset 0 0 0 2px #0b0c0c !important;
        /* GDS Black */
    }

    /* Links get a solid yellow background and dark text on focus */
    a:focus,
    a:focus-visible {
        background-color: #fd0 !important;
        color: #111827 !important;
        outline: none !important;
        box-shadow: 0 -3px 0 0 #0b0c0c inset !important;
        /* Thick bottom border effect */
        text-decoration: none !important;
    }

    /* Override for top navigation links to use their physical border instead of an inset shadow */
    .gds-nav-link:focus,
    .gds-nav-link:focus-visible {
        box-shadow: none !important;
        border-bottom-color: #0b0c0c !important;
    }

    /* Buttons receive the exact same focus treatment as links */
    button:focus,
    button:focus-visible,
    input[type="submit"]:focus,
    input[type="submit"]:focus-visible {
        background-color: #fd0 !important;
        color: #111827 !important;
        outline: none !important;
        box-shadow: 0 -3px 0 0 #0b0c0c inset !important;
        text-decoration: none !important;
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    textarea:focus,
    select:focus {
        border-color: #0b0c0c !important;
        box-shadow: 0 0 0 3px #fd0 !important;
        outline: 3px solid #0b0c0c !important;
        outline-offset: 0 !important;
    }

    /* Base form inputs should have stark, solid 2px borders, not subtle 1px gray */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        border: 2px solid #0b0c0c !important;
        border-radius: 0 !important;
    }
}

@layer utilities {

    /* 3. Strip all rounded corners globally */
    .rounded,
    .rounded-sm,
    .rounded-md,
    .rounded-lg,
    .rounded-xl,
    .rounded-2xl,
    .rounded-3xl,
    .rounded-full {
        border-radius: 0 !important;
    }

    /* 4. Flatten all drop shadows into solid structural borders */
    .shadow-sm,
    .shadow,
    .shadow-md,
    .shadow-lg,
    .shadow-xl,
    .shadow-2xl,
    .shadow-inner {
        box-shadow: none !important;
        border: 2px solid #b1b4b6 !important;
        /* GDS Mid Gray */
    }
}