.modal
{
    position: fixed;
    z-index: 1050;
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;

    display: none;
    overflow: hidden;

    transform: translate(-50%, -50%);

    outline: 0;

    -webkit-overflow-scrolling: touch;
}

.modal-header
{
    border: none;
}

/* Bootstrap's colours are fixed light ones; these restate them from the palette, state selectors copied so each still wins. */
.modal-content
{
    background-color: var(--surface);
}

.modal-footer
{
    border-top-color: var(--divider);
}

.form-control
{
    color: var(--field-text);
    border-color: var(--field-edge);
    background-color: var(--field-bg);
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control
{
    background-color: var(--field-disabled-bg);
}

.btn-default
{
    color: var(--text);
    border-color: var(--field-edge);
    background-color: var(--field-bg);
}

.btn-default:focus,
.btn-default.focus
{
    color: var(--text);
    border-color: var(--button-press-edge);
    background-color: var(--button-hover-bg);
}

.btn-default:hover,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default
{
    color: var(--text);
    border-color: var(--button-hover-edge);
    background-color: var(--button-hover-bg);
}

.btn-default:active:hover,
.btn-default.active:hover,
.open > .dropdown-toggle.btn-default:hover,
.btn-default:active:focus,
.btn-default.active:focus,
.open > .dropdown-toggle.btn-default:focus,
.btn-default:active.focus,
.btn-default.active.focus,
.open > .dropdown-toggle.btn-default.focus
{
    color: var(--text);
    border-color: var(--button-press-edge);
    background-color: var(--button-press-bg);
}

.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus
{
    border-color: var(--field-edge);
    background-color: var(--field-bg);
}

#logIn .modal-header
{
    text-align: center;

    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: #d9534f;
}

#logIn .modal-title
{
    font-size: 2.5em;
    font-weight: bold;

    color: #fff;
}

/* movies.css zeroes .checkbox label padding for the edit form, which pads its .checkbox instead; this gives Bootstrap's pulled-left checkbox room to line up with the fields. */
#sign-in-form .checkbox
{
    padding-left: 20px;
}

.modal#edit-show
{
    width: 450px;
    height: 800px;
}

#edit-show .modal-header
{
    text-align: left;

    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: var(--dialog-header-bg);
}

#edit-show .modal-body
{
    height: 600px;

    text-align: left;

    background-color: var(--surface);
}

#edit-show .modal-footer
{
    height: 50px;
    padding: 0 15px;

    border: none;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    background-color: var(--surface);
}

#edit-show .modal-footer .glyphicon
{
    margin-right: 0;
}

#edit-show .modal-footer > .btn-group
{
    float: left;
}

.btn.btn-default.disabled.edit-next,
.btn.btn-default.disabled.edit-next:hover
{
    background-color: var(--button-disabled-bg) !important;
}

#episode-delete
{
    float: right;

    margin-top: 15px;
}

#edit-show .control-label
{
    font-weight: 300;

    color: inherit;
}

#edit-show .edit-poster img
{
    width: 120px;
    /* Square art's height: taller art would grow the header and push the footer out of the fixed-height dialog. */
    max-height: 120px;
    margin-left: -15px;

    border-radius: 0;
    object-fit: contain;
}

#edit-show .modal-header .edit-show
{
    display: flex;

    align-items: center;
}

#edit-show .show-title
{
    padding-left: 25px;
}

#edit-show .show-title h4
{
    font-size: 22px;
    font-weight: 400;
}

#edit-show .show-title p
{
    font-size: .9em;

    margin-top: -10px;
}

#edit-show .tab-container
{
    display: flex;

    justify-content: center;
}

#edit-show .btn
{
    padding: 3px 12px;
}

#edit-show button.btn.btn-default.active,
#edit-show button.btn.btn-default.active:hover
{
    color: #fff !important;
    border-color: #757575 !important;
    background-color: #757575 !important;
}

#edit-show button:hover
{
    cursor: default;
}

#edit-show .btn.active:focus,
#edit-show .btn:focus
{
    color: inherit;
    border-color: var(--field-edge);
    outline: none;
    outline-offset: none;
    background-color: var(--field-bg);
}

#edit-show .btn-default:hover
{
    cursor: default;

    border-color: var(--field-edge);
    background-color: var(--field-bg);
}

/* The dialog shrinks its buttons; the Upload button sits against a full-height field, so it keeps Bootstrap's height. */
#edit-show .input-group-btn .btn
{
    padding: 6px 12px;
}

/* The file input is hidden, so its focus is shown on the label that stands in for it. */
#edit-show #artwork-file:focus + label
{
    outline: 2px solid #757575;
    outline-offset: 2px;
}

#edit-show .edit-container
{
    margin-top: 20px;
}

#edit-show .form-group
{
    margin-bottom: 5px;
}

#edit-show a
{
    text-decoration: none;

    color: inherit;
}

#artwork img
{
    width: 450px;
    /* The body is a fixed 600px, so a tall poster is scaled to leave room for the URL field below it. */
    max-height: 450px;
    margin-left: -15px;

    object-fit: contain;
}

#artwork .input-group
{
    margin-top: 15px;
}

#add-new-episode
{
    float: right;

    margin-top: 15px;
}

#add-new-episode .glyphicon
{
    margin-right: 0;
}

#meta-data
{
    max-width: 1170px;
    margin: 0 auto;
}

#meta-data.show-info
{
    max-width: 1386px;
}

#meta-data .close
{
    opacity: 1;
    color: var(--close);
    text-shadow: 0 1px 0 var(--close-shadow);
}

#meta-data .close:hover,
#meta-data .close:focus
{
    color: var(--close-hover);
}

.info-wrapper .modal-title
{
    font-size: 1.75em;

    margin-bottom: 10px;
}

.info-wrapper .modal-header,
.info-wrapper .modal-body
{
    padding: 0;
}

.info-wrapper .modal-header
{
    padding-top: 15px;
}

#meta-data h4
{
    margin-bottom: 0;
}

#meta-data hr
{
    margin-top: 10px;
}

.description-info
{
    display: inline-flex;
    align-content: center;
    align-items: center;
}

#meta-data .description-poster img
{
    width: 340px;
    height: auto;

    border-radius: 6px;
    background-color: var(--poster-bg);
}

.modal-body .col-lg-3
{
    padding-left: 0;
}

.movie-content
{
    height: 600px;

    background: var(--surface);
}

.movie-content .close
{
    opacity: 1;
    color: var(--close);
    text-shadow: 0 1px 0 var(--close-shadow);
}

.movie-content .close:hover,
.movie-content .close:focus
{
    color: var(--close-hover);
}

.modal-studio
{
    position: absolute;
    bottom: -100px;

    width: 702px;
}

.modal-studio p
{
    margin-top: -10px;
}

.modal-body hr
{
    margin-top: 10px;
}

.registration
{
    width: 450px;
    height: 600px;
    margin-top: 25px;
    padding: 25px;

    /* The panel is red in every theme, and dark fields on red read poorly, so its fields stay light. */
    color-scheme: light;
    color: #fff;
    -webkit-border-radius: 5px;
       -moz-border-radius: 5px;
            border-radius: 5px;
    background-color: #d9534f;
}

.errors
{
    color: #000;
}

.login-errors
{
    display: none;

    color: red;
}

.modal-lg
{
    width: 1100px;
}

.modal-header .description
{
    border-bottom: none;
}

#description-rating
{
    font-family: 'Times New Roman', serif;
    font-weight: bolder;

    padding: 1px 3px;

    border: 2px solid var(--text);
    border-radius: 3px;
}

#description-hd
{
    font-weight: bolder;

    position: relative;
    top: 1px;

    padding: 2px 5px;

    color: var(--surface);
    border-radius: 3px;
    background: var(--text);
}

#description-year
{
    font-size: 1.25em;

    padding-right: 5px;
}

.description-header
{
    border-bottom: 1px solid #eaeaea;
}

.description-details > .modal-title
{
    margin-bottom: 0;
}

.description-details h5
{
    font-weight: 600;
}

.description-details a
{
    text-decoration: none;

    color: var(--text);
}

.description-details a:hover
{
    color: #c9302c;
}



.studio a
{
    text-decoration: none;

    color: var(--text);
}

.studio a:hover
{
    color: #c9302c;
}

#info-body
{
    min-height: 575px;
}

.studio-margin
{
    margin-bottom: 15px;
}

.studio
{
    margin-bottom: 25px;
    margin-left: -15px;
}

.studio h5
{
    font-weight: 600;
}

.studio p
{
    margin-top: -10px;
}

.studio hr
{
    width: 770px;
}

.description-poster
{
    position: relative;

    display: inline-block;

    margin-bottom: 30px;
}

.description-poster img
{
    width: 300px;
    height: auto;

    vertical-align: top;

    border: none;
    border-radius: 6px;
}

a.magnifying-glass-icon
{
    font-size: 10em;

    position: absolute;
    top: 50%;
    left: 50%;

    transition: opacity .2s ease-in-out;
    -webkit-transform: translate(-50%, -50%);
       -moz-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
         -o-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
    text-align: center;

    opacity: 0;
    color: #fff;;
}

.description-poster:hover .description-poster-overlay
{
    transition: all .2s ease-in-out;

    opacity: .75;;
}

.description-poster:hover a.magnifying-glass-icon
{
    transition: all .2s ease-in-out;

    opacity: .8;
    color: #fff;;
}

.filler
{
    height: 35px;
}

.description-plot
{
    margin: 20px 0;
}

#movie .description-plot
{
    display: -webkit-box;
    overflow: hidden;

    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.edit-movie
{
    margin-top: 30px;
}

.edit-poster img
{
    width: 250px;
    height: auto;
    margin-left: -30px;

    border-radius: 4px;
}

.edit-form
{
    margin-right: -30px;
}

#delete-button
{
    margin-right: 15px;
    margin-bottom: 30px;
}

.confirmation
{
    position: relative;
}

.confirmation > span
{
    position: absolute;
    top: 35px;
    right: 10px;

    display: none;

    color: green;
}

.confirmation > span.match
{
    position: absolute;
    top: 35px;
    right: 10px;

    display: block;

    color: green;
}

#no-match
{
    color: #f00;
}

#no-match2
{
    color: #fff;
}

ul
{
    padding-left: 0;
}

li
{
    list-style: none;
}

.spacing
{
    margin-right: 20px;
}

#ratings-container
{
    display: inline-flex;
    height: 21px;
}

#ratings-container p
{
    font-size: 9px;
    margin-bottom: 0;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
}

.rating:not(:checked) > input
{
    position: absolute;

    clip: rect(0,0,0,0);
}

.rating:not(:checked) > label
{
    font-size: 18px;
    line-height: 1.2;

    float: right;
    overflow: hidden;

    width: .98em;

    cursor: pointer;
    white-space: nowrap;

    color: #e4e4e4;
}

.rating:not(:checked) > label:before
{
    font-family: 'Glyphicons Halflings';

    content: '\e006';
}

.rating > input:checked ~ label
{
    color: gold;
}

.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label
{
    color: #f00;
}

.rating > input:checked + label:hover,
.rating > input:checked + label:hover ~ label,
.rating > input:checked ~ label:hover,
.rating > input:checked ~ label:hover ~ label,
.rating > label:hover ~ input:checked ~ label
{
    color: #f00;
}

.rated > .glyphicon-rating
{
    font-size: 18px;
    line-height: 1.2;

    float: right;
    overflow: hidden;

    width: 1em;

    white-space: nowrap;

    color: #e4e4e4;
}

.rated > span:before
{
    font-family: 'Glyphicons Halflings';

    content: '\e006';
}

.rated > .glyphicon-rating.checked,
.rated > .glyphicon-rating.checked ~ .glyphicon-rating
{
    color: gold;
}

/*.rated p,*/
/*.rating p*/
/*{*/
    /*font-size: 9px;*/

    /*position: absolute;*/
    /*left: 95px;*/

    /*display: inline-block;*/

    /*width: 200px;*/
    /*margin: 0;*/
/*}*/

.rated p
{
    bottom: 7px;
}

.rating p
{
    bottom: 12px;
}

.showonoffswitch
{
    position: relative;

    width: 97px;

    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
}

.showonoffswitch
{
    width: 135px;
}

.onoffswitch-checkbox
{
    display: none;
}

.onoffswitch-label
{
    display: block;
    overflow: hidden;

    cursor: pointer;

    border: 2px solid var(--switch-edge);
    border-radius: 20px;
}

.onoffswitch-inner
{
    display: block;

    width: 200%;
    margin-left: -100%;

    transition: margin .3s ease-in 0s;
}

.onoffswitch-inner:before,
.onoffswitch-inner:after
{
    font-size: 14px;
    /*font-weight: bold;*/
    line-height: 37px;

    display: block;
    float: left;

    box-sizing: border-box;
    width: 50%;
    height: 37px;
    padding: 0;

    color: white;
}

.onoffswitch-inner:before,
.showonoffswitch-inner:before
{
    padding-left: 10px;

    color: #e4e4e4;
    background-color: #2b2b2b;
}

.onoffswitch-inner:after,
.showonoffswitch-inner:after
{
    padding-right: 10px;

    text-align: right;

    color: #2b2b2b;
    background-color: #e4e4e4;
}

.showonoffswitch-inner:before
{
    margin-left: -15px;

    content: 'HD';
    text-align: center;
}

.showonoffswitch-inner:after
{
    margin-left: 15px;

    content: 'Standard';

    color: #e4e4e4;
    background-color: #2b2b2b;
}

.showonoffswitch-switch
{
    position: absolute;
    right: 56px;

    display: block;

    width: 23px;
    height: 23px;
    margin: 7px;

    transition: all .3s ease-in 0s;

    border: 2px solid var(--switch-edge);
    border-radius: 20px;
    background: #fff;
}

.showonoffswitch-switch
{
    right: 83px;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner,
.onoffswitch-checkbox:checked + .onoffswitch-label .showonoffswitch-inner
{
    margin-left: 0;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .showonoffswitch-switch
{
    right: 15px;
}

/* Bootstrap gives a checked button .active by script, which isn't loaded; :has() gives the same look from the radio itself. */
.theme-choice
{
    display: flex;
}

.theme-choice .btn:has(:checked)
{
    border-color: var(--button-hover-edge);
    background-color: var(--button-hover-bg);
    box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
}

.theme-choice .btn:has(:focus-visible)
{
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}
