/* stops scroll bounce */
html,
body {
    height: 100%;
    width: 100%;
    overflow: auto;
}

/* #region - setup snippets */
html {
    line-height: 1.15;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%
}

body {
    margin: 0;
}

article,
aside,
footer,
header,
nav,
section {
    display: block
}

h1 {
    font-size: 2em;
    margin: .67em 0
}

figcaption,
figure,
main {
    display: block
}

figure {
    margin: 1em 40px
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible
}

pre {
    font-family: monospace, monospace;
    font-size: 1em
}

a {
    background-color: transparent;
    -webkit-text-decoration-skip: objects
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline;
    text-decoration: underline dotted
}

b,
strong {
    font-weight: inherit
}

b,
strong {
    font-weight: bolder
}

code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em
}

dfn {
    font-style: italic
}

mark {
    background-color: #ff0;
    color: #000
}

small {
    font-size: 80%
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline
}

sub {
    bottom: -.25em
}

sup {
    top: -.5em
}

audio,
video {
    display: inline-block
}

audio:not([controls]) {
    display: none;
    height: 0
}

img {
    border-style: none
}

svg:not(:root) {
    overflow: hidden
}

button,
input,
optgroup,
select,
textarea {
    font-family: sans-serif;
    font-size: 100%;
    line-height: 1.15;
    margin: 0
}

button,
input {
    overflow: visible
}

button,
select {
    text-transform: none
}

button,
html [type=button],
[type=reset],
[type=submit] {
    -webkit-appearance: button
}

button::-moz-focus-inner,
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner {
    border-style: none;
    padding: 0
}

button:-moz-focusring,
[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring {
    outline: 1px dotted ButtonText
}

fieldset {
    padding: .35em .75em .625em
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal
}

progress {
    display: inline-block;
    vertical-align: baseline
}

textarea {
    overflow: auto
}

[type=checkbox],
[type=radio] {
    box-sizing: border-box;
    padding: 0
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
    height: auto
}

[type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px
}

[type=search]::-webkit-search-cancel-button,
[type=search]::-webkit-search-decoration {
    -webkit-appearance: none
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit
}

details,
menu {
    display: block
}

summary {
    display: list-item
}

canvas {
    display: inline-block
}

template {
    display: none
}

[hidden] {
    display: none
}

html {
    box-sizing: border-box;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* #endregion - setup snippets */

/* #region re-set styles */
html {
    font-size: 125%;
    background: var(--backgroundColor);
    scroll-behavior: smooth;
}

.wrapper {
    /* max-width: 1080px; */
    width: var(--wrapperWidth);
    margin: 0 auto;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

a,
button,
input,
textarea,
select {
    display: flex;
    background: none;
    border: none;
    text-decoration: none;
    outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
    margin: 0;
}

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

/* #endregion re-set styles */

/* #region - variables */
:root {
    /* #region - colors */
    --backgroundColor: tomato;
    --backgroundColorDesat: #d18375;
    --darkNeutral: #050404;
    --darkNeutralOpacity: rgba(5, 4, 4, 0.5);
    --midAccent: #e6b86a;
    --midAccentOpacity: rgba(230, 184, 106, 0.3);
    --darkAccent: #720308;
    --darkAccentOpacity: rgba(114, 3, 8, 0.5);
    --lightAccent: #fff3e4;
    /* to be redefined */
    --movieInfoIconColor: var(--darkNeutral);
    --gradientBaseVar: #fff3e4;
    --gradientChangeVar: #88181e;
    --dropdownHoverColor: var(--midAccent);
    /* #endregion - colors */

    /* fonts  and icons */
    --headingFont: 'Limelight', cursive;
    --mainFont: 'Merriweather', serif;
    --galleryItemTitleSize: 1.2rem;
    --smallTextSize: 1rem;
    --smallTextLineheight: calc(var(--smallTextSize) * 1.2);
    --movieInfoIconSize: 2rem;
    --labelFontSize: 1rem;
    --toggleButtonHeight: 1.6rem;
    /* #region - sizes */
    /* main */
    --mainHeight: calc(100dvh - var(--headerMargin));
    --wrapperWidth: 80%;
    --paddingGap: 30px;
    /* header */
    --headerHeight: calc(var(--mainHeaderFontSize) + 0.8rem);
    --subHeaderHeight: 1.6rem;
    --headerMargin: calc(var(--headerHeight) + var(--subHeaderHeight));
    --subHeadingMargin: 4px;
    --mainHeaderFontSize: 2.2rem;
    --dropdownLabelWidth: 2.6rem;
    --searchIconWidth: 1.5rem;
    --narrow-dropdown-width: 55px;
    --toggleDropdownContainerWidth: calc(var(--switchWidth) + (var(--narrow-dropdown-width) + 5px));
    /* gallery */
    --galleryItemMinWidth: 14rem;
    --galleryItemPadding: 10px;
    --galleryVerticlePadding: 3dvh;
    /* form */
    --formWidth: 100%;
    --formHeight: calc(100dvh - (var(--headerMargin) + var(--bottomNavHeight)));
    --formNavHeight: 2.25rem;
    --dropdownLabelHeight: 2.2rem;
    --formBottomHeight: 5.5rem;
    --formSidePadding: 20px;
    --formBorderAndMargin: 4px;
    --innerform: calc(var(--formNavHeight) + var(--dropdownLabelHeight) + var(--formBottomHeight) + var(--regionDropdownMargin));
    --fieldsetContainerHeight: calc(var(--formHeight) - (var(--formBottomHeight) + var(--formNavHeight) + var(--dropdownLabelHeight)));
    --regionDropdownHeight: calc(var(--formHeight) - (var(--innerform)));
    --regionDropdownMargin: 5px;
    --regionDropdownWidth: 270px;
    --sortByListWidth: 55%;
    /* provider fieldset */
    --providerFieldsetPadding: 4px;
    --providerInputWidth: 100px;
    --providerLabelHeight: 62px;
    --providerButtonHeight: calc(var(--providerLabelHeight) + 10px);
    --moreProvidersButtonHeight: 1.6rem;
    /* other */
    --bottomNavHeight: 2.55rem;
    --switchWidth: 85px;
    --toggleIconWidth: calc(var(--toggleButtonHeight) - 0.1rem);
    --searchInputHeight: 1.5rem;
    --searchFormContainerHeight: calc(var(--searchInputHeight) * 5);
    --decade-slider-height: 25px;
    --slider-timeline-height: 2px;
    --fieldsetMinHeight: 95px;
    --fielsetPadding: 15px;
    /* #endregion - sizes */
}

/* #endregion - variables */

/* #region - fonts and sizes */
.main-title-container {
    display: flex;
    flex-direction: row;
    width: calc(100% - (var(--toggleDropdownContainerWidth) + 4vw));
    justify-content: space-between;
    align-items: center;
    text-align: start;
}

.main-title {
    font-size: var(--mainHeaderFontSize);
    text-align: start;
    white-space: nowrap;
    color: var(--darkNeutral);
    padding: 0;
}

h1,
h3,
h4,
legend,
button,
.form-nav a {
    font-family: var(--headingFont);
    word-wrap: break-word;
}

h2,
h5,
p,
input,
label,
div,
select {
    font-family: var(--mainFont);
}

h3 {
    line-height: 1.4rem;
}

p,
select {
    font-size: 0.8rem;
}
/* #endregion - fonts and sizes */

.make-display-none {
    display: none !important;
}

.stop-scroll {
    overflow: hidden;
}

.disabled {
    opacity: 0.2;
}

/* #region - header */
header {
    /* display: flex; */
    background: var(--lightAccent);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--headerMargin);
    z-index: 10;
}

.main-heading {
    display: flex;
    height: var(--headerHeight);
    align-items: baseline;
}

.main-heading .heading-container {
    height: var(--headerHeight);
    align-items: center;
    justify-content: space-between;
}

.heading-container {
    display: flex;
    justify-content: space-between;
}

.find-movie-button figure,
.trending-button figure {
    display: flex;
    align-self: center;
}

.heading-container h2 {
    font-size: 1.2rem;
    color: var(--darkNeutral);
}

/* #region - underline animation */
.hover-animation {
    display: inline-block;
    position: relative;
    color: var(--darkAccent);
    align-self: center;
}

.hover-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.hover-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.heading-container .hover-animation::after {
    background-color: var(--darkAccent);
}

.trending-button .hover-animation::after {
    background-color: var(--midAccent);
}

/* #endregion - underline animation */

/* #region - gradient animation */
.hover-animation {
    background: linear-gradient(to right, var(--gradientChangeVar), var(--gradientChangeVar) 50%, var(--gradientBaseVar) 50%);
    fill: linear-gradient(to right, var(--gradientChangeVar), var(--gradientChangeVar) 50%, var(--gradientBaseVar) 50%);
    background-clip: text;
    -webkit-background-clip: text;
    /* webkit-text-fill not working in safari */
    /* -webkit-text-fill-color: transparent; */
    color: transparent;
    background-size: 200% 100%;
    background-position: 100%;
    transition: background-position 0.5s ease;
    text-decoration: none;
}

.hover-animation:hover,
.hover-animation:active,
.hover-animation:focus,
.hover-animation:focus-within,
.heading-container:focus-within .hover-animation {
    background-position: 0 100%;
}

.main-title:hover {
    color: var(--darkAccent);
    cursor: pointer;
}

.heading-container .hover-animation {
    /* re-define colors */
    --gradientBaseVar: var(--darkNeutral);
    --gradientChangeVar: var(--darkAccent);
}

.trending-button .hover-animation,
.dropdown-menu .hover-animation {
    /* re-define colors */
    --gradientBaseVar: var(--midAccent);
    --gradientChangeVar: var(--lightAccent);
}

/* x button */
.form-nav .x-button:hover .lines,
.form-nav .x-button:active .lines,
.form-nav .x-button:focus .lines {
    background: var(--lightAccent);
}

.form-bottom button:hover,
.form-bottom button:active,
.form-bottom button:focus {
    background: var(--lightAccent);
    cursor: pointer;
}

.radio-button-container:hover, .radio-button-container:active, .radio-button-container:focus-within,
.info-list-links:hover, .info-list-links:active, .info-list-links:focus {
    color: var(--midAccent);
    cursor: pointer;
}

/* #endregion - gradient animation */
li:focus {
    outline: none;
}

.header-buttons-container {
    display: flex;
    width: var(--toggleDropdownContainerWidth);
    height: calc(var(--headerHeight) / 1.2);
    justify-content: flex-end;
    align-items: center;
}

.find-movie-button {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
    column-gap: 8px;
}

.find-movie-button svg {
    fill: var(--darkAccent);
    align-self: center;
    width: 1.3rem;
}

.arrow-up {
    transform: rotate(180deg);
}

.result-container {
    display: flex;
    height: var(--subHeaderHeight);
    align-items: center;
    background: var(--darkNeutral);
}

.result-heading-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.trending-button .result-heading {
    color: var(--midAccent);
    align-self: center;
}

.trending-button figure svg {
    fill: var(--midAccent);
    width: 1.5rem;
    margin-left: -8px;
}

.trending-button:hover figure svg {
    fill: var(--backgroundColor);
}

/* #region - subheading dropdown */
.trending-button {
    display: flex;
    align-items: center;
    padding: 0;
}
/* diabled dropdown menu */
.label-container.disabled-label::before,
.label-container.disabled-label::after {
    opacity: 0.4;
}
.label-container.disabled-label{
    cursor: revert;
}

.language-list.header-region {
    --subHeaderHeight: 0.8rem;
    background: none;
    align-self: baseline;
}

.language-list.header-region .label-container {
    --dropdownLabelWidth: 2rem;
    color: var(--darkNeutral);
    font-size: calc(var(--subHeaderHeight) - 0.1rem);
    height: calc(var(--subHeaderHeight) + 0.2rem);
}

.region-list.header-region,
.language-list.header-region {
    width: var(--narrow-dropdown-width);
    margin-left: 5px;
    align-items: end;
}

.region-list.header-region .label-container,
.language-list.header-region .label-container {
    display: flex;
    justify-content: space-between;
    width: var(--dropdownLabelWidth);
    border: 1px solid var(--midAccent);
    border: 1px solid var(--midAccentOpacity);

}

.region-list.header-region .label-container.open-menu {
    background-color: var(--lightAccent);
    color: var(--darkNeutral);
} 

.region-list.header-region li {
    color: var(--lightAccent);
}

.language-list.header-region li {
    display: inline-flex;
    justify-content: start;
}

.lang-code-label {
    margin-right: 1rem;
}

.empty-modal {
    position: absolute;
    top: calc((var(--headerMargin) + var(--searchFormContainerHeight)));
    left: 0;
    height: calc(100dvh - (var(--headerMargin) + var(--searchFormContainerHeight)));
    width: 100dvw;
    background-color: none;
    background-color: var(--darkNeutralOpacity);
    z-index: 0;
}

/* #region - search bar */

.search-container {
    display: flex;
    width: var(--searchIconWidth);
    justify-content: flex-end;
}

.search-container:hover .search-icon-container,
.search-container:active .search-icon-container,
.search-container:focus .search-icon-container {
    background-color: var(--backgroundColor);
    border-radius: 4px;
    padding: 1px;
}

.searchbar-form {
    display: flex;
    position: absolute;
    top: var(--headerMargin);
    right: 0;
    flex-direction: column;
    width: 100%;
    height: var(--searchFormContainerHeight);
    align-items: center;
    justify-content: center;
    background: var(--darkNeutral);
    border-top: 2px solid var(--lightAccent);
    padding: 20px 0;
    z-index: 1;
}

.searchbar-form section {
    display: flex;
    width: var(--galleryItemMinWidth);
    justify-content: center;
}

.searchbar-input-container {
    margin-bottom: 15px;
}

.searchbar-form input {
    --inputPadding: 4px;
    background: var(--lightAccent);
    color: var(--darkNeutral);
    height: var(--searchInputHeight);
    width: calc(var(--galleryItemMinWidth) - var(--searchInputHeight));
    min-width: 10rem;
    padding: var(--inputPadding);
    border-radius: 0;
}

.searchbar-form input::placeholder {
    color: var(--backgroundColorDesat);
    font-size: 1rem;
}

.searchbar-selections-container {
    flex-direction: column;
}

.searchbar-selections-container .toggle-button-container {
    outline: 2px groove var(--lightAccent);
}

.search-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-container svg {
    fill: var(--lightAccent);
    width: 1.2rem;
}

.search-button, .search-container, .toggle-button-container, 
.find-movie-button, .dropdown-menu .select, .dropdown-menu label, 
.hover-animation, .provider-buttons label {
    cursor: pointer;
}

.search-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--searchInputHeight);
    height: var(--searchInputHeight);
    background-color: var(--backgroundColor);
    padding: 2px;
}

.search-button svg {
    fill: var(--lightAccent);
    width: 1.2rem;
}
/* #endregion - search bar */

/* #endregion - subheading dropdown */

/* hover */
.find-movie-button:hover h2,
.find-movie-button:active h2 {
    color: var(--darkAccent);
}

.find-movie-button:hover svg,
.find-movie-button:active svg {
    fill: var(--backgroundColor);
}

.load-button-container button:hover svg {
    fill: var(--darkAccent);
}

.load-button-container button:active svg {
    fill: var(--darkAccentOpacity);
}

.disabled-button {
    fill: var(--midAccentOpacity) !important;
    color: var(--midAccentOpacity) !important;
    cursor: default !important;
}

.load-button-container h3 {
    text-align: center;
    color: var(--darkAccent);
}

.forward-button,
.back-button {
    cursor: pointer;
    padding: 0;
}

.load-arrow-figs {
    height: var(--bottomNavHeight);
}

.message-container {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - (var(--headerMargin) + var(--bottomNavHeight)));
    align-items: center;
    justify-content: center;
}

.message-container h3 {
    white-space: pre-wrap;
    line-height: 1.5rem;
    text-align: center;
    color: var(--darkNeutral);
}
/* #region - fade animation */
    /* runs on figure only when button is not: hovered, active, focused */
    .find-movie-button:not(:hover, :active, :focus) .fade-bounce {
        display: flex;
        position: relative;
        animation-name: fadebounce;
        animation-iteration-count: infinite;
        animation-timing-function: ease-in;
        animation-duration: 2s;
    }

    @keyframes fadebounce {
        0% {
            opacity: 0.5;
            top: 0px;
        }
        50% {
            opacity: 1;
            top: 8px;
        }
        100% {
            opacity: 0.5;
            top: 0px;
        }
    }
/* #endregion - fade animation */

/* toggle switch */
/* #region - toggle switch */
.toggle-state-text {
    display: flex;
    color: var(--lightAccent);
}

.toggle-button-container {
    display: flex;
    position: relative;
    height: var(--toggleButtonHeight);
    min-width: var(--switchWidth);
    background-color: var(--darkNeutral);
    border-radius: 6px;
    justify-content: space-around;
    align-self: center;
    padding: 1px 1px 0px 1px;
}

.slider {
    display: flex;
    position: absolute;
    background-color: var(--backgroundColor);
    border-radius: 3px;
    width: 43%;
    height: 82%;
    top: 10%;
    z-index: 0;
    transition: left 0.5s linear;
}

#movie-option .slider {
    left: 5%;
}

#tv-option .slider {
    /* 100% - ( movie-option-left-pos + slider-width + 1 ) */
    left: 53%;
}

.toggle-left,
.toggle-right {
    display: flex;
    height: 100%;
    align-items: center;
}

.toggle-button-container svg {
    width: var(--toggleIconWidth);
    fill: var(--darkNeutral);
    stroke: var(--darkNeutral);
    z-index: 1;
}

#movie-option .tv-icon svg,
#tv-option .movie-icon svg {
    fill: var(--backgroundColorDesat);
    stroke: var(--backgroundColorDesat);
}

#movie-option.toggle-button-container:hover .slider {
    /* +7 from starting position */
    left: 8%;
}

#tv-option.toggle-button-container:hover .slider {
    /* -7 from starting position */
    left: 48%;
}

/* #endregion - toggle switch */
/* #endregion - header */

/* #region - gallery */
main {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--headerMargin);
    left: 0;
    background: var(--backgroundColor);
    height: var(--mainHeight);
    width: 100%;
    justify-content: space-between;
    overflow: scroll;
    /* hide scrollbar styles*/
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

/* #region scrollbar for person search */
main.person {
    scrollbar-width: auto;
    scrollbar-color: var(--darkAccent);
}

/* #endregion scrollbar for person search */
.main-wrapper {
    position: absolute;
    top: 0;
    left: calc((100% - var(--wrapperWidth)) / 2);
}

.gallery-container {
    display: flex;
    justify-content: center;
    padding: var(--galleryVerticlePadding) 0;
    margin-bottom: var(--bottomNavHeight);
    flex-direction: column;
}

/* all gallery uls */
.gallery-container ul {
    display: flex;
    flex-wrap: wrap;
}

/* only gallery cards */
.gallery-container .gallery-list-container {
    flex-direction: row;
    width: 100%;
    column-gap: var(--paddingGap);
    row-gap: calc(var(--paddingGap) + 1rem);
    justify-content: center;
}

.gallery-items {
    display: flex;
    position: relative;
    background: var(--lightAccent);
    flex-direction: column;
    flex: 1;
    min-width: var(--galleryItemMinWidth);
    width: max-content;
    max-width: calc(100dvw / 4);
    /* min-height: calc(var(--galleryItemMinWidth) * 1.6); */
    padding: var(--galleryItemPadding);
    scroll-margin-top: var(--galleryVerticlePadding);
}

.gallery-container h3,
.gallery-container h4 {
    font-size: var(--galleryItemTitleSize);
    line-height: var(--galleryItemTitleSize + 0.1rem);
}

li .placeholder-image {
    display: flex;
    min-height: calc(var(--galleryItemMinWidth) * 1.5);
    align-items: center;
    background: var(--midAccent);
    padding: 10px;
}

li .placeholder-image svg {
    align-self: center;
}

ul li .info-container {
    display: flex;
    overflow: hidden;
    min-width: 100%;
    max-height: 6rem;
    max-width: calc(var(--galleryItemMinWidth) - (var(--galleryItemPadding) * 2));
    justify-content: space-between;
    margin: 5px 0;
}

.info-container h3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; 
    text-overflow: ellipsis;
    overflow: hidden;
    align-self: center;
}

.movie-info-container p {
    font-size: var(--smallTextSize);
    line-height: var(--smallTextLineheight);
    margin: 5px 0;
}

/* rating */
.rating {
    background: var(--midAccent);
    color: var(--darkNeutral);
    height: fit-content;
    border-radius: 5px;
    margin-left: 5px;
    padding: 5px;
}

.gallery-items .movie-info-container {
    visibility: collapse;
    /* background: var(--lightAccent); */
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--galleryItemPadding);
    /* overflow transition */
    max-height: 0;
    height: 0;
    transition: all 0.5s ease-in-out;
    overflow: hidden;

}

.overview, .more-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.overview {
    background-color: var(--lightAccent);
}

.more-info {
    background-color: var(--darkNeutral);
}

.movie-info-container .heading-container {
    position: sticky;
    bottom: 100%;
    left: 0;
    align-items: start;
    background-color: var(--midAccent);
    padding: 5px;
}

.movie-info-container .heading-container h4 {
    width: 80%;
}

.movie-info-container .heading-container .info-heading-icon {
    width: 10%;
}

.movie-info-container .heading-container .info-heading-icon svg{
    height: var(--galleryItemTitleSize);
    margin: 1px 4px 0 0 ;
    background: none;
}
 
.info-icon-container button {
    display: flex;
    position: relative;
    height: calc(var(--movieInfoIconSize) - 0.2rem);
    width: var(--movieInfoIconSize);
    align-items: center;
    align-self: center;
    justify-content: center;
    padding: 0;
    border-radius: 25%;
}

.info-icon-container button {
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
}

.info-icon-container .button-up {
    background-color: rgba(225, 225, 225, 0.2);
}

.info-icon-container .button-down {
    box-shadow: rgba(5, 4, 4, 0.8) 0px 8px 16px -12px inset, rgba(5, 4, 4, 0.8) 0px -8px 16px -12px inset;
    border-radius: 25%;
    --movieInfoIconColor: var(--lightAccent);
}

.info-icon, .info-icon svg {
    width: 100%;
    height: inherit;
    background: none;
}

.info-icon svg circle,
.info-icon svg {
    fill: var(--movieInfoIconColor);
    stroke: var(--movieInfoIconColor);
}

.movie-info-container .info-icon-container > *:hover,
.movie-info-container .info-icon-container > *:active {
    --movieInfoIconColor: var(--lightAccent);
    cursor: pointer;
}

.gallery-items:hover .movie-info-container,
.gallery-items:active .movie-info-container {
    display: block;
    visibility: visible;
    max-height: calc(100% - var(--galleryItemPadding));
    height: 100%;
    /* transition: all 0.5s ease-in-out; */
}

/* #region - movie-info */

.movie-info-container {
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: var(--galleryItemPadding);
    padding-bottom: 0;
}

.movie-info-middle {
    padding: 7px;
    overflow-y: scroll;
}

.movie-info-list {
    width: 100%;
    justify-content: space-between;
}

.movie-info-list-container.movie-info-middle li,
.movie-info-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3px;
    margin-bottom: 5px;
    font-size: var(--smallTextSize);
    line-height: var(--smallTextLineheight);
    width: 100%;
}

.info-list-links {
    text-decoration: underline;
}
/* for viewing options provider icons */
.movie-info-container .movie-info-list .provider-icon-list {
    flex: 0 1 30%;
    min-width: 2.9rem;
    margin: 2px;
}

.movie-info-container .movie-info-list .provider-icon-list:hover,
.movie-info-container .movie-info-list .provider-icon-list:active,
.movie-info-container .movie-info-list .provider-icon-list:focus{
    box-shadow: inset 0 0 15px var(--lightAccent);
    -webkit-box-shadow: inset 0 0 15px var(--lightAccent);
}

/* .movie-info-container .movie-info-list .provider-icon-list img:hover,
.movie-info-container .movie-info-list .provider-icon-list img:active,
.movie-info-container .movie-info-list .provider-icon-list img:focus{
    box-shadow: 0 0 15px var(--lightAccent);
    -webkit-box-shadow: 0 0 15px var(--lightAccent);
} */

.movie-info-container .movie-info-list .provider-icon-list img:active {
    opacity: 0.6;
}

.movie-info-list-fieldsets {
    justify-content: center;
    margin: 5px calc(var(--providerFieldsetPadding) / 2);
    padding: var(--providerFieldsetPadding);
    text-align: left;
}

.movie-info-list-fieldsets h4 {
    color: var(--backgroundColor);
}

.provider-icons {
    border: solid var(--lightAccent) 1px;
}

.more-providers-button {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--moreProvidersButtonHeight);
    justify-content: center;
    align-items: center;
    background-color: var(--midAccent);
    opacity: 0.7;
    
}

.more-providers-button:not(.disabled):hover,
.more-providers-button:not(.disabled):active {
    opacity: 1;
    cursor: pointer;
}

.more-providers-button figure {
    display: flex;
    align-items: center;
}

.more-providers-button svg {
    fill: var(--darkNeutral);
    align-self: center;
    width: 1.5rem;
}

.more-providers-button:focus svg {
    border: 1px dashed var(--lightAccent);
}

.more-providers-button.disabled svg {
    opacity: 0.2;
}

.icon-message-container,
.error-message-container, 
fieldset .error-message-container {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0;
}

/* fieldset .error-message-container {
    height: 100%;
}

.icon-message-container {
    height: 6rem;
} */

.dropdown-menu .error-message-container {
    height: -webkit-fill-available;
}

.icon-message-container h4,
.error-message-container h4 {
    width: 80%;
    color: var(--backgroundColor);
}

/* #endregion - movie-info */

/* #endregion - gallery */

/* #region - form */
.form-section {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 8;
}

.form-container {
    display: flex;
    position: absolute;
    top: var(--headerMargin);
    left: calc((100% - var(--wrapperWidth)) / 2);
    height: var(--formHeight);
    width: var(--wrapperWidth);
    background: rgba(5, 4, 4, 0.96);
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 5px var(--formSidePadding);
    padding-bottom: var(--formBottomHeight);
    border-top: solid 1px var(--lightAccent);
    overflow-y: scroll;
    overflow-x: hidden;
}

.form-nav {
    display: flex;
    width: var(--formWidth);
    justify-content: space-evenly;
    align-items: center;
    height: var(--formNavHeight);
    border-bottom: solid 1px var(--lightAccent);
}

.form-nav a {
    font-size: 1rem;
    color: var(--midAccent);
}

.form-nav a:hover,
a:active,
a:focus {
    color: var(--lightAccent);
}

.fieldset-container {
    /* display was inline-block for some reason */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: var(--fieldsetContainerHeight);
    width: var(--formWidth);
    border-top: 1px solid var(--lightAccent);
    padding-top: 15px;
    overflow-y: scroll;
    overflow-x: hidden;
}

legend {
    color: var(--midAccent);
    scroll-margin-top: 30px;
    scroll-behavior: smooth;
}

.form-button-container {
    display: flex;
    width: 100%;
    height: fit-content;
    justify-content: center;
}

.form-button-container button {
    background: var(--midAccent);
    color: var(--darkNeutral);
    width: fit-content;
    padding: 5px;
    margin-top: var(--subHeadingMargin);
    /* margin-bottom: 20px; */
}

/* fieldset */
fieldset {
    display: flex;
    position: relative;
    flex-direction: column;
    color: var(--lightAccent);
    width: 99%;
    justify-content: flex-start;
    margin-bottom: 10px;
    /* overflow: scroll; */
}

.genre-fieldset {
    flex: 1 1 30%;
}

.decade-fieldset {
    min-height: var(--fieldsetMinHeight);
    height: 30%;
    justify-content: center;
}

.providers-fieldset {
    padding-bottom: 5px;
    height: calc((100px * 3) + var(--moreProvidersButtonHeight));
}

.genre-buttons-list {
    grid-template-columns: repeat(auto-fill, 175px);
}

.provider-list-container {
    grid-template-columns: repeat(auto-fill, 100px);
    min-height: var(--fieldsetMinHeight);
    height: calc(var(--providerButtonHeight) * 3 - var(--fielsetPadding));
    margin-bottom: var(--moreProvidersButtonHeight);
}

.provider-list-container, .genre-buttons-list {
    display: grid;
    position: relative;
    gap: 5px;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 5px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.radio-button-container {
    display: flex;
    column-gap: 5px;
    align-items: center;
}

/* #region - decade slider */

.decade-slider-container {
    display: flex;
    position: relative;
    width: 100%;
    height: var(--decade-slider-height);
    align-items: center;
}

 
.decade-slider-container:hover .decade-slider,
.decade-slider-container:active .decade-slider,
.decade-slider-container:focus .decade-slider {
    opacity: 1;
  }

.decade-slider {
    -webkit-appearance: none;
    width: 100%;
    height: var(--slider-timeline-height);
    margin-bottom: 5px;
    background: var(--lightAccent);
    outline: none;
    opacity: 0.8;
    -webkit-transition: .2s;
    transition: opacity .2s;
    z-index: 0;
  }

  #startRange, #endRange {
    position: absolute;
    top: calc((var(--decade-slider-height) / 2) - var(--slider-timeline-height));
    left: 0;
    height: 0;
    visibility: hidden;
  }

  /* doesn't work when webkit and moz are combined */
  
  #startRange::-webkit-slider-thumb , #endRange::-webkit-slider-thumb {
    visibility: visible;
    -webkit-appearance: none;
    appearance: none;
    width: var(--decade-slider-height);
    height: var(--decade-slider-height);
    background: var(--backgroundColor);
    border-radius: 3px;
    cursor: pointer;
    z-index: 1;
  }

  #startRange::-moz-range-thumb , #endRange::-moz-range-thumb {
    visibility: visible;
    width: var(--decade-slider-height);
    height: var(--decade-slider-height);
    background: var(--backgroundColor);
    border-radius: 3px;
    cursor: pointer;
    z-index: 1;
  }
    /* #region - slider timeline, disabled thumbs */

    #slider-timeline {
        visibility: visible;
        z-index: 0;
    }

    #slider-timeline::-webkit-slider-thumb {
        display: none;
    }

    #slider-timeline::-moz-range-thumb {
        display: none;
    }
    /* #endregion - slider timeline, disabled thumbs */


  .range-label-container {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    color: var(--midAccent);
  }
  /* #endregion - decade slider */

.provider-buttons {
    max-height: var(--providerLabelHeight);
    align-items: center;
    border: solid 1px transparent;
}

.provider-buttons:hover,
.provider-buttons:active,
.provider-buttons:focus {
    border: solid 1px var(--lightAccent);
}

.provider-buttons label {
    height: 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.provider-buttons img {
    height: 100%;
    width: var(--providerLabelHeight);
}

fieldset label {
    display: flex;
    align-items: center;
    align-self: center;
}

input[type="radio"], 
input[type="checkbox"] {
    accent-color: var(--backgroundColor);
    margin: 10px;
}

/* x button */
.x-button {
    display: flex;
    position: absolute;
    top: 0.8%;
    right: 3%;
    width: 20px;
    justify-content: center;
    cursor: pointer;
}

.lines {
    height: 25px;
    width: 4px;
    background: var(--backgroundColor);
    border-radius: 20px;
}

.lines.a {
    position: absolute;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    transform: rotate(45deg);
}

.lines.b {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.modal {
    display: flex;
    background: var(--backgroundColor);
    width: var(--formWidth);
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
}

.modal p {
    color: var(--darkNeutral);
    font-size: 1rem;
}

.form-bottom {
    display: flex;
    flex-direction: column-reverse;
    position: absolute;
    bottom: 0;
    left: calc(var(--formSidePadding) + (var(--formBorderAndMargin) / 2));
    height: var(--formBottomHeight);
    width: calc(var(--formWidth) - (var(--formSidePadding) * 2) - var(--formBorderAndMargin));
    align-items: center;
    justify-content: space-around;
    background-color: var(--darkNeutral);
    border-top: 1px solid var(--lightAccent);
    padding: 3px 0;
}

/* #region - dropdown menus */
/* #region - outer label */

.dropdown-menu {
    display: flex;
    flex-direction: column;
    height: var(--subHeaderHeight);
    width: var(--formWidth);
    justify-content: center;
    align-items: center;
}

.dropdown-menu.region-list {
    align-items: center;
    margin: 0 auto;
}

.region-list.header-region .label-container {
    position: absolute;
    right: calc(((100% - var(--wrapperWidth)) / 2) + var(--searchIconWidth));
    margin: 4px;
}

.dropdown-menu:hover .label-container,
.dropdown-menu:active .label-container,
.dropdown-menu:focus .label-container {
    border: 1px solid var(--midAccent);
}

.dropdown-menu.sort-by {
    align-items: flex-end;
    padding: 0 calc(var(--formBorderAndMargin) / 2);
}

.dropdown-menu .label-container {
    display: flex;
    position: relative;
    height: calc(var(--labelFontSize) * 1.3);
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: var(--labelFontSize);
    padding: 4px 3px 3px 3px;
    border: solid 1px var(--lightAccent);
    color: var(--lightAccent);
    padding-right: 1rem;
}

/* region dropdown in form */
.dropdown-menu.form-region .label-container {
    width: var(--regionDropdownWidth);
    justify-content: center;
}

.dropdown-menu.sort-by .label-container {
    width: var(--sortByListWidth);
}

/* #region - dropdown arrows */

.header-region .label-container::before, 
.header-region .label-container::after {
    right: calc(var(--size) - 3px);
}

.language-list .label-container::before, 
.language-list .label-container::after {
    --size: 0.2rem;
    margin-right: 2px;
}

.label-container::before,
.label-container::after {
    --size: 0.3rem;
    display: flex;
    position: absolute;
    content: "";
    width: var(--size);
    right: var(--size);
    border-left: var(--size) solid transparent;
    border-right: var(--size) solid transparent;
    pointer-events: none;
}

.label-container::before {
    border-bottom: var(--size) solid var(--backgroundColor);
    top: 18%;
}

.label-container::after {
    border-top: var(--size) solid var(--backgroundColor);
    bottom: 18%;
}

/* #endregion - dropdown arrows */
/* #endregion - outer label */
/* #region - main list */
.select-container {
    position: absolute;
    background-color: var(--lightAccent);
    padding: 10px;
    overscroll-behavior: none;
    z-index: 10;
}

.select-container ul li {
    margin-bottom: 2px;
    padding: 3px;
}

.region-list.form-region .select-container {
    top: calc(var(--formNavHeight) + var(--dropdownLabelHeight));
    height: calc(var(--regionDropdownHeight) + var(--regionDropdownMargin));
}

.header-region .select-container {
    height: calc(100dvh - (var(--headerHeight) + var(--bottomNavHeight)));
    width: var(--regionDropdownWidth);
    right: calc((100% - var(--wrapperWidth)) / 2);
}

.region-list.header-region .select-container {
    top: var(--headerMargin);
    height: calc(100dvh - (var(--headerMargin) + var(--bottomNavHeight)));
    margin: 0;
    background-color: var(--darkNeutral);
    border-top: 2px solid var(--lightAccent);
}

.region-list.header-region .select-container li:hover {
    color: var(--darkNeutral);
}

.language-list.header-region .select-container {  
    top: var(--headerHeight);
    border-top: 2px solid var(--darkNeutral);
}

/* list */
.dropdown-menu .select {
    display: flex;
    flex-direction: column;
    color: var(--darkNeutral);
    width: 100%;
    height: auto;
    text-align: center;
}

.dropdown-menu .select-container.visible {
    overflow: scroll;
}

.sort-by .select-container.visible {
    position: absolute;
    bottom: var(--formBottomHeight);
    height: fit-content;
    width: var(--sortByListWidth);
}

.select-container.hidden,
.movie-info-container .hidden,
.hidden {
    display: none;
}

.autoLoadRef {
    visibility: hidden;
    width: 1px;
    height: 1px;
}

.dropdown-menu .select li:hover {
    background-color: var(--dropdownHoverColor);
}

/* #endregion - main list */
/* #endregion - dropdown menus */
/* #endregion - form */

/* #region - more-info */
.info-icon-container {
    display: flex;
    position: sticky;
    top: 100%;
    left: var(--galleryItemPadding);
    /* width: calc(100% - (var(--galleryItemPadding) * 2)); */
    width: 100%;
    height: var(--movieInfoIconSize);
    align-items: center;
    justify-content: space-between;
    padding: 3px var(--galleryItemPadding);
    background-color: var(--midAccent);
}
/* #endregion - more-info */

/* #region - load buttons */
.load-buttons-section {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    background: var(--backgroundColor);
    box-shadow: 0 0 3px -1px var(--darkAccent);
    height: var(--bottomNavHeight);
    width: 100%;
    align-items: center;
}

.load-button-container {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
}

.load-button-container svg {
    fill: var(--midAccent);
    width: 50px;
}

.scroll-load {
    display: flex;
    height: calc(var(--paddingGap) * 4);
    justify-content: space-evenly;
    align-items: center;
    /* scroll will snap to this element */
    scroll-snap-type: y;
}

.gallery-end-list {
    display: flex;
    justify-content: center;
    align-items: end;
    margin-top: var(--paddingGap);
}
/* #endregion - load buttons */

/* #region - media queries */
@media(max-width: 930px) {

    .wrapper {
        --wrapperWidth: 85%;
    }

    .main-title-container {
        justify-content: flex-start;
    }

    .find-movie-button, 
    .find-movie-button:hover, 
    .find-movie-button:active {
        justify-content: flex-start;
        padding: 8px;
    }

    .find-movie-button svg {
        width: calc(var(--mainHeaderFontSize) / 1.3);
    }

    .find-movie-text{
        display: none;
    }

    .dropdown-menu.sort-by {
        align-items: center;
        --sortByListWidth: 100%;
    }
}

@media(max-width: 740px) {

    header figure h2 {
        display: none;
    }
}

@media(max-width: 700px) {
    /* #region - variables */
    :root {
        --headerHeight: calc(var(--mainHeaderFontSize) * 2.35);
        --mainHeaderFontSize: calc(1.3rem + 1vw);
    }
    /* #endregion - variables */

    .main-title {
        width: calc(var(--mainHeaderFontSize) * 3.5);
        white-space: pre-line;
        line-height: var(--mainHeaderFontSize);
    }

    .main-title-container {
        align-items: end;
    }

    /* #region - right side header */
    .heading-container .header-buttons-container {
        width: inherit;
        flex-direction: column-reverse;
        justify-content: space-between;
        align-items: flex-end;
    }

    .language-list.header-region {
        align-self: end;
        margin-left: 0;
    }
    /* #endregion - right side header */

    .gallery-items {
        max-width: calc(100dvh / 2.4);
    }
}

@media(max-width: 565px) {
    :root {
        --formNavHeight: 70px;
    }

    .find-movie-button, 
    .find-movie-button:hover, 
    .find-movie-button:active {
        width: calc(var(--mainHeaderFontSize) / 1.2);
        justify-content: flex-start;
        padding: 8px;
    }

    .form-nav {
        align-items: flex-end;
        justify-content: space-between;
    }

    .x-button .lines {
        height: 20px;
        width: 3px;
    }
}

/* switch to mobile mode with auto load */
@media(max-width: 460px) {
    :root {
        --smallTextSize: calc(0.8rem + 0.8dvh);
        --formBottomHeight: 5.8rem;
        --galleryItemMinWidth: 33dvh;
        --galleryVerticlePadding: 3dvh;
        --paddingGap: 20px;
        --fieldsetContainerHeight: 100%;
        /* removed --formNavHeight */
        --innerform: calc(var(--dropdownLabelHeight) + var(--formBottomHeight));
        --formHeight: calc(100dvh - var(--headerMargin));
        --regionDropdownHeight: calc(var(--formHeight) - var(--innerform));
    }

    .wrapper {
        --wrapperWidth: 90%;
    }

    header h1 {
        font-size: 1.6rem;
    }

    /* #region - when region moves next to x-button on mobile */
    .region-list.form-region {
        position: absolute;
        top: 0.5%;
        left: 0;
        margin: 0;
    }

    .region-list.form-region .label-container {
        width: 90px;
    }

    .region-list.form-region .select-container {
        top: calc(var(--dropdownLabelHeight) - (var(--regionDropdownMargin) * 2));
    }

    .main-title-container {
        column-gap: 12px;
    }

    .find-movie-button {
        display: flex;
        /* width: 17%; */
        justify-content: flex-end;
        align-self: end;
        padding: 7px;
    }
    /* #endregion - when region moves next to x-button on mobile */


    /* for toggle button on portrait mobile */
    .result-heading-container {
        height: 100%;
        justify-content: space-between;
    }

    .fieldset-container {
        border: none;
    }

    /* header dropdowns */
    .header-region .select-container {
        /* centered */
        left: calc(50% - (var(--regionDropdownWidth) / 2));  
    }

    .sort-by, .sort-by .label-container {
        height: fit-content;
    }

    .genre-buttons-list {
        grid-template-columns: repeat(auto-fill, 190px);
    }
}

@media(max-width: 340px) {
    :root {
        --toggleDropdownContainerWidth: calc(var(--switchWidth) + 5px);
    }

    .form-nav a {
        font-size: 0.8rem;
    }
}

@media (max-height: 600px) {

    :root {
        --galleryItemTitleSize: 1rem;
        --movieInfoIconSize: 1.6rem;
        --paddingGap: 15px;
        --formBottomHeight: 4.5rem;
    }

    .info-container h3 {
        line-clamp: 1;
        -webkit-line-clamp: 1;
    }
}

/* Safari 11+ */

@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) and (stroke-color:transparent) {

        /* simulate row and column gap in safari */
        li.safari-only {
            margin: calc(var(--paddingGap) / 2);
        }

        .dropdown-menu span.safari-only {
            border: none;
        }

        /* for form because fit-content doen't work befor v15 */

        fieldset {
            overflow: scroll;
        }

        .genre-fieldset {
            min-height: 12rem;
        }

        .decade-fieldset {
            min-height: 8rem;
        }

        .providers-fieldset {
            min-height: 6rem;
        }
    }
}

/* #endregion - media queries */