@import url('https://fonts.googleapis.com/css?family=Roboto');

:root {
  --black: #272727;
  --yellow: #F2C53D;
  --spacing: 50px;
}

html {
    box-sizing: border-box;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 10px;
    color: var(--black);
}

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

body {
    font-size: 15px;
    background: var(--black);
    margin: var(--spacing);
}

h2, h3, h5 {
    margin: 0 0 5px 0;
}

button {
    background: var(--yellow);
    border: 1px solid var(--black);
    padding: 10px;
    cursor: pointer;
}

button:focus {
    outline: none;
}

img {
    max-width: 100%;
}

/* **************************** */
.wrapper {
    display: grid;
    grid-gap: 1.2rem;
    justify-content: center;
    width: 30%;
    margin: 0 auto;
}

/* form */
.search-form {
    display: grid;
    grid-gap: 1rem;
    grid-template-areas:
        "search-field search-field search-field search-field search-icon"
}

.search-field {
    grid-area: search-field;
    font-size: 1.4rem;
    font-family: 'Roboto', sans-serif;
    padding: 0 5px;
}

.search-icon {
    grid-area: search-icon;
}

.fas {
    justify-content: center;
    display: grid;
    color: var(--black);
}

/* .resDisplay */
.resDisplay {
    display: grid;
    grid-template-columns: minmax(400px, 1fr);
    grid-gap: 1.2rem;
}

.showBorder {
    color: whitesmoke;
    display: grid;
    justify-items: center;
    padding: 15px 20px;
    border: 1px solid whitesmoke;
    border-radius: 2px;
}

.errMsg {
    color: indianred;
}

.resDisplay h2 {
    color: var(--yellow);
}

.resDisplay h2, .resDisplay p {
    margin-top: var(--spacing);
    --spacing: 15px;
    text-align: justify;
}

.resDisplay .rating span {
    color: indianred;
}

/* episode-list */
.episode-list {
    display: grid;
    grid-template-columns: minmax(220px, 1fr);
    grid-gap: 10px;
    width: 100%;
    border-radius: 5px;
    margin-top: 1rem;
    opacity: 1;
    transition: all 250ms ease-in-out;
}

.hide {
    display: none;
    opacity: 0;
}

.accordion {
    width: 100%;
}

.accordion-list {
    list-style-type: none;
    padding-left: 0;
}

.accordion-item:not(:last-child) {
    border-bottom: 2px solid indianred;
}

.accordion-title {
    text-decoration: none;
    color: var(--black);
    display: flex;
}

.accordion-title:hover {
    color: var(--black);
}

.accordion-title span {
    flex-grow: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, .55);
    color: whitesmoke;
    transition: all 250ms ease-in-out;
}

.ep-content {
    text-indent: 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0.0000001;
    transition: all 250ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.ep-content img {
    width: 55%;
}

.is-active {
    max-height: 100em;
    padding: 1rem;
    opacity: 1;
}

/* media queries */
@media (max-width: 400px) {
    .search-form {
        justify-content: center;
        grid-template-areas:
            "search-field search-icon"
    }
    .resDisplay {
        grid-template-columns: 1fr;
    }
    .ep-content {
        text-indent: 0;
    }
}