@import "../../css/colors.css";
@import "../../css/units.css";
@import "../../css/typography.css";

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: $ui-modal-overlay;
}

.modal-content {
    margin: 100px auto;
    outline: none;
    border: .25rem solid $ui-white-transparent;
    padding: 0;
    border-radius: $space;
    user-select: none;
    width: 500px;
    color: $text-primary;
    overflow: hidden;
}

/*
    TODO figure out how to remove filter altogether
    since it is null...
    Modal header has 3 items:
    |x     title       filter|

    Use the same width for both side item containers,
    so that title remains centered
*/
$sides: 20rem;

.header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    height: $library-header-height;

    box-sizing: border-box;
    width: 100%;
    background-color: $pen-primary;
}

.header-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: white;
    user-select: none;
}

.header-item-filter {
    display: flex;
    flex-basis: $sides;
    justify-content: flex-end;
}

.header-item-title {
    flex-grow: 1;
    flex-shrink: 0;
    justify-content: center;
    user-select: none;
    letter-spacing: 0.4px;
    cursor: default;
}

.header-item-title h2 {
    font-size: 1.25rem;
}

.header-item-close {
    display: flex;
    flex-basis: $sides;
    justify-content: flex-start;
}

.body {
    background: $ui-white;
    padding: 1.5rem 2.25rem;
    text-align: center;
}

.input-row {
    margin: 1.5rem 0;
    font-weight: bolder;
    text-align: right;
    display: flex;
    justify-content: center;
    border: 1px solid;
    border-radius: 0.25rem;
    overflow: hidden;
}

.ok-input-container {
    border-color: $motion-primary;
    box-shadow: 0 0 0 0.2rem $motion-transparent;
}

.bad-input-container {
    border-color: $data-primary;
    box-shadow: 0 0 0 0.2rem hsla(30, 100%, 55%, 0.15);
}

.input-row input {
    width: 100%;
    padding: 0 1rem;
    height: 3rem;
    color: $text-primary;
    font-size: .875rem;
    outline: none;
    border: none;
}

.input-row input::placeholder {
    font-style: italic;
    color: $text-primary-transparent;
}

.input-row button {
    padding: 0.5rem 2rem;
    font-weight: bold;
    font-size: .875rem;
    cursor: pointer;
    border: 0px solid $pen-primary;
    outline: none;
}

.input-row button.ok-button {
    background: $pen-primary;
    color: white;
}

.error-row {
    margin: 1.5rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
    background: hsla(30, 100%, 55%, 0.25);
    color: $data-primary;
    border: 1px solid $data-primary;
    border-radius: 0.25rem;
}

.error-row p {
    font-size: 0.875rem;
    font-weight: bold;
}

/* Confirmation buttons at the bottom of the modal */
.button-row {
    margin: 1.5rem 0;
    font-weight: bolder;
    text-align: right;
    display: flex;
    justify-content: center;
}

.button-row button {
    border: 1px solid $motion-primary;
    border-radius: 0.25rem;
    padding: 0.5rem 1.5rem;
    background: white;
    font-weight: bold;
    font-size: .875rem;
    cursor: pointer;
    color: $motion-primary;
}

.faq-link-text {
    margin: 2rem 0 .5rem 0;
    font-size: .875rem;
    color: $text-primary;
}

.faq-link {
    color: $motion-primary;
    text-decoration: none;
}
