body,
html {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

li {
    list-style: none;
}

a,
img,
span,
input,
video,
button {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a.decoration-underline {
    text-decoration: underline;
    color: var(--primary);
}

img {
    height: auto;
}

input,
button {
    background: none;
    border: none;
    outline: none;
    font: inherit;
}

input {
    width: 100%;
}

button {
    cursor: pointer;
}

option {
    white-space: pre-wrap;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    outline: none;
    color: var(--on-background);
}

md-filled-button,
md-outlined-button {
    box-shadow: var(--elevation-3);
    border-radius: var(--radius-extra-large);
}

md-outlined-button:hover {
    box-shadow: var(--elevation-2);
}

report-card-component,
search-img-card-component {
    display: contents;
}

.fw-300 {
    font-weight: 300;
}

.f-w-bold {
    font-weight: bold;
}

/*-----------------------------------*\
  # COLORS
\*-----------------------------------*/

.common-hover:hover {
    cursor: pointer;
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    border-radius: 20px;
    transition: background-color 0.3s ease; /* Smooth transition for background color */
}

/*-----------------------------------*\
  # OVERLAY
\*-----------------------------------*/

.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: blur(0.1px);
    z-index: 1;
}

.hidden-overlay {
    display: none;
}

/*-----------------------------------*\
  # NOTIFICATIONS
\*-----------------------------------*/

.notification-list {
    position: fixed;
    top: 10px;
    right: 10px;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease-in-out; /* Smooth transition for opacity */
}

.notification-message {
    margin-block-start: 10px;
    padding: 16px;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--elevation-2);
    display: none;
    opacity: 0;
    position: relative;
}

.success-notification {
    background-color: #4caf50;
    color: white;
}

.warning-notification {
    background-color: #ff9800;
    color: white;
}

.error-notification {
    background-color: #f44336;
    color: white;
}

.info-notification {
    background-color: #2196f3;
    color: white;
}

.notification-list.show,
.notification-message.show {
    display: flex;
    opacity: 1;
}

.close-notification-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: large;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    vertical-align: middle;

    &:hover {
        background-color: var(--outline-variant);
        transition: background-color 0.3s ease; /* Smooth transition for background color */
        color: var(--outline);
    }
}

/*-----------------------------------*\
  # RIPPLE
\*-----------------------------------*/

:has(> .state-layer) {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.state-layer {
    border-radius: inherit;
    inset: 0;
    opacity: 0;
    transition: var(--motion-duration-short-2) var(--motion-easing-linear);
}

:has(> .state-layer):hover > .state-layer {
    opacity: 0.08;
}

:has(> .state-layer):is(:focus, :focus-visible, :active) > .state-layer {
    opacity: 0.12;
}

.ripple,
.state-layer {
    --state-layer-bg: var(--surface);
    background-color: var(--state-layer-bg);
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.ripple {
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    transform-origin: center;
    border-radius: var(--radius-circle);
    opacity: 0.12;
    animation: ripple 800ms var(--motion-easing-standard) forwards;
}

.icon-btn > .ripple {
    width: 40px;
    height: 40px;
    animation: icon-button-ripple 200ms var(--motion-easing-standard) forwards;
}

@keyframes ripple {
    0% {
        scale: 0;
    }

    100% {
        scale: 2.5;
    }
}

@keyframes icon-button-ripple {
    0% {
        scale: 0;
    }

    100% {
        scale: 1;
    }
}

/*-----------------------------------*\
  # SCROLLBAR STYLES
\*-----------------------------------*/

/* Firefox */
* {
    scrollbar-width: auto;
    scrollbar-color: var(--primary) var(--background);
}

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 16px;
}

*::-webkit-scrollbar-track {
    background: var(--background);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
    border: 3px solid var(--background);
}

/*-----------------------------------*\
  # GO UP BUTTON
\*-----------------------------------*/
#goUpButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    box-shadow: var(--elevation-2);
}

/*-----------------------------------*\
  # CUSTOM BUTTON SPINNER
\*-----------------------------------*/
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/*-----------------------------------*\
  # ANIMATE BORDER
\*-----------------------------------*/
.border-container {
    border: 3px solid transparent;
}

.animate-border {
    animation: borderAnimation 5s infinite; /* Animation lasts 6s (3s active + 3s inactive) and repeats infinitely */
}

@keyframes borderAnimation {
    0%,
    50% {
        border-color: transparent; /* Inactive */
    }
    25%,
    75% {
        border-color: var(--primary); /* Active border color */
    }
}

/*-----------------------------------*\
  # MAIN SPINNER
\*-----------------------------------*/

[data-main-spinner] {
    position: fixed;
    top: 50%;
    left: 50%;
}

/*-----------------------------------*\
  # NO SHADOWDOM SUPPORT
\*-----------------------------------*/

.no-shadowdom-support .seo-fallback {
    display: block !important;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 20px;
}

.no-shadowdom-support .seo-fallback h1 {
    color: #495057;
    margin-bottom: 15px;
}

.no-shadowdom-support .seo-fallback p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.5;
}
