/*** BUTTONS ***/

/* Default is "primary" */
button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
    font-size: 16px;
    letter-spacing: -0.16px;
    line-height: 24px;
    font-weight: 700;
    border-radius: var(--radius-xxs);
    border: none;
    background: var(--main-blue);
    color: white;
    transition: color 100ms,
                background-color 100ms,
                border-color 100ms;
}
button:hover {
    background: var(--main-blue-shades-55);
}
button:active {
    background: var(--main-blue-shades-45);
}
button.disabled {
    background: var(--main-black-shades-95);
    color: var(--main-black-shades-70);
}
/* the Loading button doesn't have any hover or active effects */
button.submit_loading:hover,
button.submit_loading:active {
    background: var(--main-blue);
}
button .buttonsvg {
    display: flex;
}

/* Secondary & Icon-Only */
/* (Icon-only buttons always load with the same styles as Secondary buttons) */
button.secondary,
button.icononly {
    border: 1px var(--main-black-shades-85) solid;
    background-color: white;
    color: var(--main-black);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.14px;
    line-height: 21px;
}
button.secondary:hover,
button.icononly:hover {
    background: var(--main-blue-shades-97); 
    border-color: var(--main-blues-shades-90);
    color: var(--main-blue); 
}
button.secondary.active, button.secondary:active,
button.icononly.active, button.icononly:active {
    background: var(--main-blue-shades-95); 
    border-color: var(--main-blue);
    color: var(--main-blue); 
}
button.secondary.disabled,
button.icononly.disabled {
    background: var(--main-white); 
    border-color: var(--main-black-shades-85);
    color: var(--main-black-shades-70); 
}
button.icononly {
    padding: 8px;
    min-width: auto;
    height: auto;
}

/* Tertiary */
button.tertiary {
    background-color: var(--main-greyblue-shades-97);
    color: var(--main-black);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.14px;
    line-height: 21px;
}
button.tertiary:hover {
    background: var(--main-blue-shades-97); 
    color: var(--main-blue); 
}
button.tertiary.active,
button.tertiary:active {
    background: var(--main-blue-shades-95); 
    color: var(--main-blue); 
}
button.tertiary.disabled {
    background: var(--main-black-shades-97); 
    color: var(--main-black-shades-70); 
}

/* Delete */
button.delete {
    background-color: white;
    border: 1px var(--ratings-red-shades-80) solid;
    color: var(--ratings-red);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.14px;
    line-height: 21px;
}
button.delete:hover {
    border-color: var(--ratings-red-shades-70);
    background-color: var(--ratings-red-shades-97);
}
button.delete:active {
    border-color: var(--ratings-red);
    background-color: var(--ratings-red-shades-95);
}
button.delete:disabled {
    border-color: var(--black-shades-85);
    background-color: var(--main-white);
}
button.delete.loading, button.delete.loading:hover button.delete.loading:active {
    border: 1px var(--ratings-red) solid;
    background-color: var(--ratings-red);
}

/* Streaming */
.streaming {
    display: flex;
    width: 100%;
    padding: 4px 10px 4px 4px;
    align-items: center;
    gap: 10px;
    background-color: var(--main-white);
    color: var(--main-black);
} 
.streaming_platform {
    width: 48px;
    height: 48px;
    border-radius: 6px;
}
.streaming_infoarrow {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.streaming_infowrap {
    display: flex;
    flex-direction: column;
}
.streaming_name {
    font-size: 13px;
    line-height: 20px;
    letter-spacing: -0.13px;
    text-align: left;
    max-width: 160px;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.streaming_info {
    display: flex;
    flex-direction: row;
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: -0.12px;
    gap: 4px;
}
.streaming_option {
    border-left: 1px var(--main-black-shades-85) solid;
    padding-left: 4px;
    white-space: nowrap;
}
.streaming_option:first-child {
    border: none;
    padding-left: 0;
}

/* Buttons within modal */
.modal_dialog button {
    padding: 16px 40px;
    border-radius: 6px;
}
.modal_dialog .streaming {
    padding: 4px 10px 4px 4px;
}

/* Sharing buttons */
.modal_dialog .share {
    border-radius: 0px;
}
.modal_dialog .share img {
    width: 22px;
    height: 22px;
}


@media screen and (max-width: 575px) {
    .modal_dialog button {
        padding: 12px 24px;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -0.14px;
    }
    .modal_dialog .share {
        border-radius: 0px;
        font-size: 12px;
    }
    .modal_dialog .streaming {
        padding: 4px 8px 4px 4px;
    }
}

/* With Icon */
button.withicon {
    gap: 6px;
    display: flex;
}
button.withicon svg {
    width: 22px;
    height: 22px;
}
button.withicon.tertiary svg {
    width: 14px;
    height: 14px;
}

button.navbutton {
    padding: 16px;
    align-self: stretch;
    border: 1.5px solid var(--main-black);
    background: var(--main-white);
    color: var(--main-black-15);
    font-size: 14px;
    line-height: 21px;
}

/* Overlay - General */
.overlay {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
 /*   min-height: 38px;  Not sure why I had this here, but it messes other things up */
    letter-spacing: -0.14px;
    background: rgba(255, 255, 255, 0.35);
    color: var(--main-white);
    gap: 8px;
    padding: 0;
}
.overlay:hover {
    background: rgba(0, 0, 0, 0.55);
}

/* Overlay - Expanding */
/* This has to take the following form: 
 * <button class='overlay expanding'>
      <div class='buttonsvg'>SVG</div>
      <span>Overlay text</span>
   </button>
 */
.overlay.added,
.overlay.expanding {
    min-width: auto;
    justify-content: flex-start;
    padding: 8px;
    width: 38px;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    overflow: hidden;
    transition: width 100ms; /* This doesn't currently work when we expand to "auto" width */
    background: rgba(0, 0, 0, 0.35);
}
.overlay.added:hover,
.overlay.expanding:hover {
    width: auto;
    padding-right: 8px;
}

/* Overlay - Variations */
/* 2024.01.07 - These aren't yet being used anywhere */
.overlay.heart,
.overlay.watchlist,
.overlay.star,
.overlay.bookmark {
    background: none;
    gap: 2px;
}
.overlay.heart svg,
.overlay.watchlist svg,
.overlay.star svg,
.overlay.bookmark svg {
    fill: black;
    fill-opacity: 20%;
}
.overlay.heart:hover svg,
.overlay.watchlist:hover svg,
.overlay.star:hover svg,
.overlay.bookmark:hover svg {
    fill-opacity: 100%;
}
.overlay.heart.active svg,
.overlay.watchlist.active svg,
.overlay.star.active svg,
.overlay.bookmark.active svg {
    fill: white;
    fill-opacity: 100%;;
}

/* Rounded Buttons */
/* These are actually defined as anchors in the code: 
<a class="roundedbutton" href="http://www.critdev.com/people/Katherine_Waterston/">
    <img src="https://www.criticker.com/img/players/thumbs/49926.jpg" alt="Katherine_Waterston">
    <span>Katherine Waterston</span>
</a>
*/
.roundedbutton {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px 8px 3px 3px;
    gap: var(--spacing-3xs);
    background-color: var(--main-white);
    border: 1px solid var(--main-greyblue-shades-90);
    border-radius: var(--radius-full);
    color: var(--main-black);
    font-size: 12px;
    letter-spacing: -0.12px;
    line-height: 17px;
    height: 32px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 100ms,
                color 100ms,
                border-color 100ms;
}
.roundedbutton img {
    height: 24px;
    width: 24px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.roundedbutton.noimg {
    padding: 4px 8px;
}
.roundedbutton:hover {
    background-color: var(--main-blue-shades-97);
    border: 1px solid var(--main-blue-shades-70);
    color: var(--main-blue);
}
.roundedbutton:active {
    background-color: var(--main-blue-shades-95);
    border: 1px solid var(--main-blue-shades-70);
    color: var(--main-blue);
}

/* Card Buttons */
button.cardbutton {
    line-height: normal;
    display: flex;
    align-items: center;
    gap: 1px;
    color: var(--main-greyblue);
    font-size: 14px;
    letter-spacing: -0.14px;
    line-height: 21px;
    font-weight: 600;
    padding: 0;
    background-color: inherit;
    border: none;
    min-width: auto;
}
button.cardbutton .buttonsvg {
    border-radius: var(--radius-full);
    padding: 4px;
}
button.cardbutton:hover {
    color: var(--main-blue);
}
button.cardbutton:hover .buttonsvg {
    background-color: var(--main-blue-shades-97);
}

button.cardbutton.starbutton:hover {
    color: var(--main-black);
}
button.cardbutton.starbutton.active {
    color: var(--main-black);
}
button.cardbutton.starbutton.active .buttonsvg {
    color: var(--ratings-yellow);
}
button.cardbutton.starbutton:hover .buttonsvg {
    color: var(--ratings-yellow);
    background-color: var(--ratings-yellow-shades-95);
}

button.cardbutton.heartbutton:hover {
    color: var(--main-black);
}
button.cardbutton.heartbutton.active .buttonsvg {
    color: var(--ratings-red);
}
button.cardbutton.heartbutton:hover .buttonsvg {
    color: var(--ratings-red);
    background-color: var(--ratings-red-shades-95);
}

button.cardbutton.bookmark:hover {
    color: var(--main-black);
}
button.cardbutton.bookmark.active {
    color: var(--main-black);
}
button.cardbutton.bookmark.active .buttonsvg svg {
    fill: var(--main-black);
}
button.cardbutton.bookmark:hover .buttonsvg {
    color: var(--main-black);
    background-color: var(--main-black-shades-95);
}

/*** Sidebar ***/
button.sidebarbutton {
    display: flex;
    flex-direction: row;
    background-color: var(--main-white); 
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    letter-spacing: -0.14px;
    font-weight: 600;
    line-height: 21px;
    color: var(--main-black);
    border-radius: 0;
    width: 100%;
    justify-content: flex-start;
}
button.sidebarbutton:hover {
    color: var(--main-blue);
}
@media screen and (max-width: 992px) {
    button.sidebarbutton {
        padding: 8px;
    }
}


div.switchwrap {
    border: 1px var(--main-greyblue-shades-85) solid;
    border-radius: var(--radius-xxs);
    display: flex;
    overflow: hidden;
}
button.switch {
    padding: 8px;
    border-radius: 0;
    color: var(--main-greyblue-shades-70);
    border: none;
    background-color: var(--main-white);
}
button.switch:hover:not([disabled]) {
    color: var(--main-greyblue-shades-60);
}
button.switch:disabled {
    background-color: var(--main-greyblue-shades-95);
    pointer-events: none; /* To allow wrapped tooltips to work */
}

.hidden {
    display: none;
}

.loading {
    display: none;
    position: relative;
    overflow: hidden;
    cursor: default;
}