:root {
    --primary-font: "Lato", "sans-serif";

    --blue: #0B499B;
    --light-blue: #A7C5EC;
    --red: #FB5757;
    --light-red: #F7DEE8;
    --green: #2D9F4B;
    --light-green: #e9ffef;
    --white: #F5F5F5;
    --gray: #CBD5E0;
    --lavendar: #E7DAED;
    --black: #111111;

    --small: calc(0.875 * var(--base-size));
    --base-size: 1rem;
    --scale: 1.25;
    --h6: calc(var(--base-size) * var(--scale));
    --h5: calc(var(--h6) * var(--scale));
    --h4: calc(var(--h5) * var(--scale));
    --h3: calc(var(--h4) * var(--scale));
    --h2: calc(var(--h3) * var(--scale));
    --h1: calc(var(--h2) * var(--scale));

    --card-shadow: 2px 5px 4px 0 rgba(251, 87, 87, 0.4);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--primary-font);
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body.loading {
    overflow: hidden;
}

body.loading #app,
body.loading header,
body.loading footer {
    display: none;
}

#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    /* Optional styling */
    background: #fff;
}

h1 {
    font-size: var(--h1);
}

h2 {
    font-size: var(--h2);
}

h3 {
    font-size: var(--h3);
}

h4 {
    font-size: var(--h4);
}

h5 {
    font-size: var(--h5);
}

small,
.text_small {
    font-size: calc(var(--base-size) / var(--scale));
}

header {
    width: 100%;
    margin-bottom: 4px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    background-color: transparent;

    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: white;
    box-shadow: 0 2px 50px var(--gray);
}

header.scrolled .links a {
    color: var(--blue);
}

nav {
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--blue);
}

img {
    width: 100%;
    max-width: 100%;
}

figure {
    width: fit-content;
}

body {
    font-size: var(--base-size);
}


section {
    /*
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
    */
    box-sizing: border-box !important;
    margin: auto;
    max-width: 1440px;
    padding: 2rem 0;
}

.breadcrumb {
    background-color: var(--white);
    padding: 0.5rem 2rem;
    margin: 0.5rem 0;
    max-width: 100vw;
    color: var(--red);
}

.breadcrumb p {
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    column-gap: 1rem;
}

.breadcrumb svg {
    height: 16px;
    width: 16px;
    fill: var(--red);
}


.btn {
    border-radius: 8px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    text-wrap: nowrap;
    width: fit-content;
    display: block;
}

.section-title {
    color: var(--red);
    text-align: center;
    margin: 0 0 32px 0;
    font-weight: 700;
}

.section-description {
    color: var(--black);
    text-align: center;
    font-size: 1rem;
    margin: 0 auto;
}

/* Navigation Bar */
.nav-links,
.nav-links > div > * {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 2rem;
}

.nav-links {
    column-gap: 2.5rem;
}

.links ul {
    width: 100%;
}

.links li {
    font-size: var(--h5);
    font-weight: 600;
    color: var(--blue);
    display: block;
    text-wrap: nowrap;
}

.links li a {
    color: var(--white);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    height: 2px;
    background-color: currentColor;
    transform: translateX(-50%);
    width: 0;
    transition: 0.3s width ease;
}

.nav-link:hover::after {
    width: 100%;
}

/*.links li:hover {*/
/*    transform: scale(1.2);*/
/*    transition: 150ms ease;*/
/*}*/

.toggle-locale li {
    color: var(--red);
    font-size: 20px;
    font-weight: 500;
}

.btn-danger {
    background-color: var(--red);
}

.problem-btn {
    width: 100%;
}

.problem-btn a {
    font-size: 25px;
}

.hamburger {
    display: none;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #101010;
}

.header-logo img,
footer figure img {
    height: 100px !important;
}

/* Footer Section */
footer {
    background: linear-gradient(to top, rgba(245, 212, 225, 1) 0%, rgba(245, 212, 225, 0.75) 19%, #fff 100%);
    line-height: 1.5;
    border-top: 1px solid var(--gray);
    padding-top: 2rem;
}

footer .footer-body .container {
    padding: 0 2rem;
}

footer h4 {
    color: var(--red);
}

footer p {
    font-size: var(--base-size);
    color: var(--black);
}

footer .social-links {
    display: flex;
    column-gap: 16px;
    margin-top: 1rem;
}

footer .social-links li a:hover {
    background-color: var(--red);
    transition: all 200ms ease;
}

footer .social-links li a:hover svg {
    fill: white !important;
    transition: all 200ms ease;
    transform: scale(1.2);
}

footer .social-links li svg {
    width: 20px;
    height: 20px;
    fill: var(--red);
}

footer .social-links li a {
    display: inline-flex;
    border-radius: 50%;
    padding: 16px;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.15);
    align-items: center;
}

.footer-body .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    padding: 0 2rem;
}

.footer-body .row .col:nth-child(3) svg {
    width: 1rem;
    vertical-align: middle;
    fill: var(--red);
}

.footer-body .col:nth-child(3) p span {
    margin-left: 1rem;
}

.footer-body .copyright {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--gray);
    margin-top: 3rem;
}

.success {
    color: var(--green);
}

.divider {
    background-color: var(--gray);
    height: 1px;
}

footer .footer-body,
header nav {
    max-width: 1440px;
    margin: 0 auto;
}


.form-control,
.form-label {
    display: block;
}

.form-control:active,
.form-control:focus,
.form-control:focus-within,
.form-control:focus-visible{
    outline: 1px solid var(--red);
    border-color: var(--red);
}

.form-label {
    color: var(--blue);
    display: flex;
    align-items: center;
    width: fit-content;
}

.form-control {
    height: 65px;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    margin: 1rem 0;
    width: 100%;
    align-items: center;
    padding: 1rem;
    color: var(--blue);
    border-color: var(--blue);
    border-width: 1px;
    border-style: solid;
}

.form-report select,
::picker(select) {
    appearance: base-select;
    transition: 0.4s;
}

select::picker-icon {
    color: var(--blue);
    transition: 0.4s rotate;
}

select:open::picker-icon {
    rotate: 180deg;
}

textarea.form-control {
    padding: 0.5rem;
    height: auto;
}

.form-location-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-location-group > * {
    flex-grow: 1;
}

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* Alert Box */
.alert {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    animation: hideElement 0s linear 5s forwards;
    z-index: 999;
    backdrop-filter: blur(12px);
}

.alert-content-wrapper {
    position: relative;;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger .alert-content::before,
.alert-info .alert-content::before,
.alert-success .alert-content::before,
.alert-secondary .alert-content::before {
    content: "";
    width: 16px;
    height: 16px;

    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;

    /* WebKit support */
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
}


.alert-danger .alert-content::before {
    mask-image: url("/static/icons/alert-danger.svg");
    --webkit--mask-image: url("/static/icons/alert-danger.svg");
    background-color: var(--red);
}

.alert-info .alert-content::before {
    mask-image: url("/static/icons/alert-info.svg");
    --webkit--mask-image: url("/static/icons/alert-info.svg");
    background-color: var(--blue);
}

.alert-success .alert-content::before {
    mask-image: url("/static/icons/alert-success.svg");
    --webkit--mask-image: url("/static/icons/alert-success.svg");
    background-color: var(--green);
}

.alert-secondary .alert-content::before {
    mask-image: url("/static/icons/alert-secondary.svg");
    --webkit--mask-image: url("/static/icons/alert-secondary.svg");
    background-color: var(--gray);
}

.alert-danger {
    color: var(--red);
    border-bottom: 1px solid var(--red);
}

.alert-info {
    color: var(--blue);
    border-bottom: 1px solid var(--blue);
}

.alert-success {
    color: var(--green);
    border-bottom: 1px solid var(--green);
}

.alert-secondary {
    color: var(--gray);
    border-bottom: 1px solid var(--gray);
}

.alert-danger::before,
.alert-info::before,
.alert-secondary::before,
.alert-success::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    animation: shrinkWidth 5s linear forwards;
}

.alert-danger::before {
    background: var(--red);
}

.alert-success::before {
    background: var(--green);
}

.alert-info::before {
    background: var(--blue);
}

.alert-secondary::before {
    background: var(--gray);
}

@keyframes shrinkWidth {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

@keyframes hideElement {
    to {
        display: none;
        visibility: hidden;
        opacity: 0;
        height: 0;
        overflow: hidden;
    }
}

/* Custom Upload */
.custom-upload-container .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrapper img {
    height: 18px;
    width: 18px;
}

.add-report-images {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.wrapper div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-upload {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--blue);
    transition: background 0.2s ease;
    width: fit-content;
    gap: 0.5rem;
}

.custom-upload::before {
    content: "";
    mask-image: url("/static/icons/upload-icon.svg");
    --webkit--mask-image: url("/static/icons/upload-icon.svg");
    background-color: var(--blue);
    height: 18px;
    width: 18px;
}

.custom-upload:hover {
    background-color: var(--blue);
    color: white;
}

.custom-upload:hover.custom-upload::before {
    background-color: white;
}

.form-report input[type="file"] {
    display: none;
}

.preview-image {
    max-width: 100%;
    height: 100%;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.file-name {
    font-size: 0.9em;
    color: #444;
    margin-top: 5px;
}

#report-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 25%, 300px), 1fr));
    gap: 1rem;
}

/* Tooltip */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-container img {
    height: 18px;
    width: 18px;
}

.tooltip-container .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 250px;
    background-color: #333;
    color: var(--white);
    text-align: center;
    padding: 6px 10px;
    border-radius: 4px;

    /* Positioning */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);

    /* Tooltip arrow */
    white-space: nowrap;
    transition: opacity 0.3s;
}

.tooltip-container .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%; /* arrow at bottom of tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


.tooltip-btn-danger,
.tooltip-btn-success {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.tooltip-btn-success {
    background: var(--light-green);
    border: 1px solid var(--green);
}

.tooltip-btn-danger {
    background: var(--light-red);
    border: 1px solid var(--red);
}

.required {
    height: 12px;
    width: 12px;
    align-self: flex-start;
}

/* Language */
.form-language select {
    overflow: hidden;
}

.form-language select,
.form-language ::picker(select) {
    appearance: base-select;
}

.form-language ::picker(select) {
    border: none;
}

.form-language select option {
    display: flex;
    gap: 0.5rem;
    background: var(--light-red);
    padding: 8px;
    transition: 0.4s;
}

.form-language select option:not(option:last-of-type){
    border-bottom: none;
}

.form-language select {
    background: var(--white);
    padding: 0.5rem;
    width: 150px;
}

.form-language select selectedContent{
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
