@source "../**/*.{html,erb,js}";
@import "tailwindcss";
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom base tweaks */
/* Custom overrides (Tailwind already loaded via stylesheet_link_tag "tailwind") */
body {
    font-family: var(--brand-body-font-family, 'Inter', sans-serif);
}

/* Add any additional component tweaks below */
:root {
    --brand-blue: #040e85;
    --brand-white: #fff;
    --brand-brown: #c69c6c;
    --brand-body-font-family: "Helvetica", sans-serif;
    --brand-header-font-family: "Sanomat Web";
    --bs-body-font-family: var(--brand-body-font-family) !important;
    --navbar-height: 80px;
    --footer-height: 8vh;
}

#main-navigation {
    -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
            box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
    min-height: var(--navbar-height);
    background-color: var(--brand-blue);
}
#main-navigation a {
    color: var(--brand-white);
    font-weight: 500;
}
main {
    margin: 0;
    padding: 0;
    padding-bottom: var(--footer-height);
}
.margin-nav {
    margin-top: var(--navbar-height);
}
.white-background {
    background-color: var(--brand-white);
}

.blue-background {
    background-color: var(--brand-blue);
    color: var(--brand-white);
}

.bg-button {
    background-color: var(--brand-brown);
    color: var(--brand-white);
}

.bg-button:hover {
    background-color: var(--brand-white);
    color: black !important;
}

/* Footer */
footer {
    min-height: var(--footer-height);
    background-color: var(--brand-blue);
    color: var(--brand-white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    -webkit-box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.5);
            box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.5);
    right: 0;
    left: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--brand-header-font-family);
    font-weight: 500;
    font-style: italic;
}

/* Minimal helpers for Stimulus validation toggles (replacing Bootstrap) */
.hide { display: none !important; }
.invalid-feedback { display: none; }
.form-control.is-invalid,
.is-invalid.form-control {
    border-color: #ef4444 !important; /* Tailwind red-500 */
    -webkit-box-shadow: none !important;
            box-shadow: none !important;
}
.is-invalid + .invalid-feedback { display: block; }

/* Optional checkbox label alignment */
.form-check-input { vertical-align: middle; }
.form-check-label { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* Brand font variable and override the body font-family to use it. */
:root {
    --brand-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}

/* Provide a simple, plain-CSS banner-img utility so this file doesn't require Tailwind processing. */
.banner-img {
    -o-object-fit: cover;
       object-fit: cover;
    height: 50vh;
}

@media (min-width: 640px) {
    .banner-img { height: 50vh; }
}

@media (min-width: 1024px) {
    .banner-img { height: 60vh; }
}