/* ===================================== 
   Public API Request
======================================== */

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

* {
	box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: "Nunito", sans-serif;
    text-align: center;
    background: rgba(235, 235, 235, 0.9);
}

header {
    padding: 15px 5px 5px;
    background: rgba(0, 0, 0, 0.8);
}

.header-inner-container {
    max-width: 1180px;
    margin: auto;
}

header h1 {
    font-size: 1.5em;
    font-weight: bolder;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 35px;
}

.search-input {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(200, 200, 200, 0.9);
    border-radius: 0.25rem 0 0 0.25rem ;
    max-width: 20rem;
    transition: .4s ease-out;
    outline: none;
}

.search-input:active, .search-input:hover, .search-input:focus {
    border: 1px solid rgba(50, 50, 50, 0.9);
}

.search-submit {
    cursor: pointer;
    height: 33px;
    background: rgba(245, 245, 245, 0.9);
    border-radius: 0 0.25rem 0.25rem 0;
    border: 1px solid rgba(200, 200, 200, 0.9);
    transition: .4s ease-out;
    outline: none;
}

.search-submit:active, .search-submit:hover, .search-submit:focus {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(50, 50, 50, 0.9);
}


/* ===================================== 
   Gallery
======================================== */

.gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    width: 100%;
    max-width: 1200px;
    margin: 25px auto;
}
  
.card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    cursor: pointer;
    width: 100%;
    max-width: 360px;
    margin: 10px 10px 20px;
    padding: 10px;
    background: rgba(245, 245, 245, 0.9);
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(50, 50, 50, 0.1);
    transition: .4s ease-out;
    overflow: hidden;
}

.card-img {
    width: 95px;
    height: 95px;
    margin: 10px 15px auto 10px;
    border-radius: 50%;
    transition: all 0.4s ease-out;
}

.card-info-container {
    text-align: left;
}

.card-name {
    margin: 20px auto 0;
}

.card-text {
    font-size: 0.9em;
    color: rgba(50, 50, 50, 0.7);
    margin: 7px auto;
    transition: .4s ease-out;
}

.cap {
    text-transform: capitalize;
}


/* ===================================== 
   Modal
======================================== */

.modal-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal {
    position: relative;
    width: 95%;
    max-width: 420px;
    min-height: 415px;
    margin: 10px auto auto;
    padding-bottom: 15px;
    background: rgba(255, 255, 255, 1);
    border-radius: 4px 4px 0 0 ;
    border: 1px solid rgba(100, 100, 100, 0.3);
    transition: .4s ease-out;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.8);
    outline: none;
    border-radius: 4px 4px 0 0 ;
    border: 1px solid rgba(50, 50, 50, 0.3);
}

.modal-img {
    width: 150px;
    min-width: 150px;
    height: 150px;
    min-height: 150px;
    margin-top: 35px;
    border-radius: 50%;
    transition: all 0.4s ease-out;
}

.modal-name {
    margin-bottom: 5px;
}

.modal-text {
    color: rgba(50, 50, 50, 0.7);
    margin: 10px;
}

.modal hr {
    width: 75%;
    margin: 25px auto 30px;
    border-color: rgba(200, 200, 200, 0.2);
}

.modal-btn-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    width: 95%;
    max-width: 420px;
    padding: 10px 15px 15px;;
    margin: 10px auto auto;
    background: rgba(255, 255, 255, 1);
    border-radius: 4px 4px 0 0 ;
    border: 1px solid rgba(100, 100, 100, 0.3);
}


.modal-btn-container .btn {
    display: inline-block;
    cursor: pointer;
    font-size: 0.85em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75em 1.5em;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px 4px 0 0 ;
    transition: .4s ease-out;
    outline: none;
  }

/* ===================================== 
   Loading indicator
======================================== */

.loading-container {
    margin: 50px auto;
}

.loading-container p {
    font-weight: bolder;
}

.loading-indicator {
    display: inline-block;
    content: '';
    width: 25px;
    height: 25px;
    margin-bottom: -7px;
    padding: 5px;
    background: url('../img/loading.png');
    background-size: cover;
    border-radius: 50%;
    transition: all 0.3s ease-out;
    animation: loadingSpin 1s infinite;
}

@keyframes loadingSpin {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}


/* ===================================== 
   Helper classes
======================================== */

.fade-in {
    animation: fadeIn 0.4s forwards;
}

@keyframes fadeIn {
    0% {opacity: 0; display: flex}
    100% {opacity: 1}
}

.fade-out {
    animation: fadeOut 0.4s forwards;
}

@keyframes fadeOut {
    0% {opacity: 1}
    100% {opacity: 0; display: none}
}
  

/* ===================================== 
   Media Queries
======================================== */

/* ===================================== 
   Tablet
======================================== */

@media (min-width: 768px) {
    .header-inner-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        padding-right: 25px;
        padding-left: 25px;
    }

    .header-text-container {
        text-align: left;
    }

    .search-container {
        margin-top: 25px;
    }

    .modal {
        margin-top: 75px;
    }
}


/* ===================================== 
   Desktop
   Hover styles on desktop 
======================================== */

@media (min-width: 1024px) {

    .card:hover {
        background: rgba(255, 255, 255, 1);
        border: 1px solid rgba(50, 50, 50, 0.3);
    }

    .card:hover .card-text {
        color: rgba(25, 25, 25, 1); 
    }

    .btn:hover {
        background: rgba(255, 255, 255, 1);
        color: rgba(25, 25, 25, 1); 
    }
}