@charset "UTF-8";

:root {
    /* Primary Color */
    --bg-darkMode: hsl(207, 26%, 17%);
    --bg-lightMode: hsl(0, 0%, 98%);
    --txt-darkBlue: hsl(200, 15%, 8%);
    --txt-white: hsl(0, 0%, 100%);
    --ele-darkMode: hsl(209, 23%, 22%);
    --txt-input: hsl(0, 0%, 52%);

    /* Typography */
    --font-family: "Nunito Sans", sans-serif;
    --fw-default: 300;
    --fw-bold: 600;
    --fw-bolder: 800;
    --fs-homePage: 14px;
    --fs-detailPage: 16px;

    --box-shadow: 0px 0px 28px 14px rgba(232, 232, 232, 1);
}

.fullscreen {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    outline: none;
    touch-action: manipulation;
    box-sizing: border-box;
}

*,
*::after,
*::before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: inherit;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    font-family: var(--font-family);
    font-weight: var(--fw-default);
    font-size: var(--fs-homePage);
    margin: 0;
    padding: 0;
    background-color: var(--bg-lightMode);
    color: var(--txt-darkBlue);
    -webkit-tap-highlight-color: rgb(0, 0, 0);
}

main {
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    min-width: 0px;
    margin: auto;
}

/* MISC */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: var(--bolder-fw);
    line-height: 1.2;
}

small,
.small {
    font-size: 0.85rem;
}

ol,
ul {
    margin-left: 10px;
    padding: 0;
    list-style: none;
}

.clearfix::after,
.clearfix::before {
    content: " ";
    display: table;
}

.clearfix::after {
    clear: both;
}

a,
a:hover {
    color: inherit;
    text-decoration: none;
}

a:not([href]):not([class]),
a:not([href]):not([class]):hover {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

em,
i {
    font-style: italic;
}

strong,
b {
    font-weight: var(--fw-bold);
}

.is-hidden {
    visibility: hidden;
}

.d-none {
    display: none;
}

.active {
    color: var(--txt-darkBlue);
}

.active:hover {
    font-weight: var(--fw-bold);
}

/* .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
} */


/* Navbar */
.navbar {
    width: 100%;
    margin-bottom: 125px;
    background-color: var(--txt-white);
}

.navbar a.navbar-brand {
    font-weight: var(--fw-bolder);
    font-size: var(--fs-detailPage);
}

.navbar a.toggle-switch {
    text-decoration: none;
    color: var(--txt-darkBlue);
    font-weight: var(--fw-bolder);
}

/* Controls */
#controls_container {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-lightMode);
    margin-bottom: 75px;
}

/* Search Box */
#searchBox {
    width: 450px;
    position: relative;
}

.input-group-text {
    border: none;
    outline: none;
    border-radius: none;
    background-color: var(--txt-white);
    color: var(--txt-input);
}

.input-group-text i.fa-search {
    font-size: var(--fs-homePage);
}

.form-control,
.form-control:focus {
    height: 50px;
    box-shadow: none;
    border: none;
    outline: none;
    border-radius: none;
    font-size: var(--fs-homePage);
    color: var(--txt-input);
}

::placeholder {
    font-size: var(--fs-homePage);
    color: var(--txt-input);
}

::-moz-placeholder {
    font-size: var(--fs-homePage);
    color: var(--txt-input);
}

::-webkit-input-placeholder {
    font-size: var(--fs-homePage);
    color: var(--txt-input);
}

::-ms-input-placeholder {
    font-size: var(--fs-homePage);
    color: var(--txt-input);
}

/* Select Box */
#selectBox {
    width: 225px;
    position: relative;
    border: 0;
    border-radius: 0;
    outline: none;
}

.form-select,
.form-select:focus {
    height: 50px;
    border: 0;
    border-radius: 0;
    outline: none;
    font-size: var(--fs-homePage);
    color: var(--txt-input);
    caret-color: var(--txt-darkBlue);
}

/* Show Countries */
#showCountries {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    align-items: stretch;
    margin: 0 auto;
    background: var(--bg-lightMode);
}

#countryCard {
    width: 17rem;
    height: auto;
    border: 0;
    border-radius: 0;
    outline: none;
    background: var(--txt-white);
    margin-bottom: 40px;
    cursor: pointer;
}

#countryCard:hover {
    transform: scale(1.01);
}

#countryCard .card-img-top {
    width: 17rem;
    height: 10rem;
    display: block;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    outline: none;
}

#countryCard .card-body {
    background-color: var(--txt-white);
    font-size: var(--fs-homePage) !important;
}

#countryCard .card-title {
    font-size: var(--fs-homePage);
    margin-bottom: 15px;
    font-weight: var(--fw-bolder);
    letter-spacing: 1.2px;
}

#countryCard .card-text {
    font-size: var(--fs-homePage);
    font-weight: var(--fw-default);
    color: var(--txt-darkBlue);
    margin-bottom: 5px;
    text-align: start;
    margin-left: 0;
}

#countryCard .card-text strong {
    font-weight: var(--fw-bold) !important;
}

#countryCard .card-text strong span {
    font-size: var(--fs-homePage) !important;
}

/* Show Country Details */
.detail-card {
    width: 100%;
    height: 100%;
    position: relative;
}

.back-button-wrap {
    background-color: var(--txt-white);
    width: 100px;
    border: 0;
    margin-bottom: 75px;
    border-radius: 0;
    outline: none;
}

.back-button-wrap #backBtn {
    font-weight: var(--fw-bold);
    color: var(--txt-darkBlue);
    font-size: var(--fs-detailPage);
    border: 0;
    border-radius: 0;
    outline: none;
    padding: 7px 16px;
}

#detailCard {
    height: 100%;
    background-color: var(--bg-lightMode);
    border: 0;
    border-radius: 0;
    outline: none;
    padding-bottom: 1.1rem;
}

#detailCard:hover {
    transform: scale(1.01);
}

#country_flag {
    width: 475px;
    height: 450px;
    border: 0;
    border-radius: 0;
    outline: none;
    background-color: var(--bg-lightMode);
}

#countryName {
    font-weight: var(--fw-bolder);
    margin: 50px 0;
    letter-spacing: 1.1px;
}

#detailCard .card-body .card-text,
#detailCard .card-footer .card-text {
    font-size: var(--fs-detailPage);
    color: var(--txt-darkBlue);
}

#detailCard .card-body .card-text strong,
#detailCard .card-footer .card-text strong {
    font-weight: var(--fw-bold);
    color: var(--txt-darkBlue);
    font-size: var(--fs-detailPage);
}

#detailCard .card-footer {
    margin-top: 35px;
    border: 0;
    border-radius: 0;
    outline: none;
    font-size: var(--fs-detailPage);
    background-color: var(--bg-lightMode);
}

#detailCard .card-footer .list-inline {
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--bg-lightMode);
}

#detailCard .card-footer .list-inline .list-inline-item {
    border: 0;
    border-radius: 0;
    outline: none;
    display: inline-block;
    cursor: pointer; 
    text-decoration: none;
    padding: 0;
    font-size: var(--fs-detailPage);
}

#detailCard .card-footer .list-inline .list-inline-item a {
    text-decoration: none;
    cursor: pointer;
    font-size: var(--fs-detailPage);
    color: var(--txt-darkBlue);
    padding: 2px 20px;
    /* margin-left: 10px; */
}

/* Back To Top */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: solid thin var(--txt-input);
    outline: none;
    background-color: var(--txt-white);
    color: var(--txt-darkBlue);
    font-weight: var(--fw-bolder);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    font-size: var(--fs-detailPage);
}

#backToTop:hover {
    opacity: 0.6;
}

/* Footer */
.footer,
.footer .container {
    background-color: var(--txt-white);
    padding-top: 2px;
    padding-bottom: 2px;
}

.footer span {
    background-color: var(--txt-white);
    color: var(--txt-darkBlue);
    font-weight: var(--fw-bold);
    font-size: 9px;
}

.dark-mode .fullscreen, .dark-mode body {
    background-color: var(--bg-darkMode);
    color: var(--txt-white);
    width: 100%;
    min-height: 100vh;
}

.dark-mode main,
.dark-mode .navbar,
.dark-mode a.navbar-brand,
.dark-mode a.toggle-switch,
.dark-mode #controls_container,
.dark-mode #searchBox,
.dark-mode .input-group-text,
.dark-mode .input-group-text i.fa-search,
.dark-mode .form-control,
.dark-mode ::placeholder,
.dark-mode #selectBox,
.dark-mode .form-select,
.dark-mode #showCountries,
.dark-mode #countryCard,
.dark-mode #countryCard .card-body,
.dark-mode #countryCard .card-title,
.dark-mode #countryCard .card-text,
.dark-mode #countryCard .card-text stong,
.dark-mode #countryCard .card-text strong span,
.dark-mode .detail-card,
.dark-mode .back-button-wrap,
.dark-mode #backBtn,
.dark-mode #detailCard,
.dark-mode #detailCard .card-body,
.dark-mode #detailCard .card-body .card-text,
.dark-mode #detailCard .card-footer .card-text,
.dark-mode #detailCard .card-body .card-text strong,
.dark-mode #detailCard .card-footer,
.dark-mode #detailCard .card-footer .card-body,
.dark-mode #detailCard .card-footer .card-text,
.dark-mode #detailCard .card-footer .card-text strong,
.dark-mode #detailCard .card-footer .card-text strong span,
.dark-mode #detailCard .card-footer .list-inline,
.dark-mode #detailCard .card-footer .list-inline .list-inline-item {
    background-color: var(--bg-darkMode);
    color: var(--txt-white);
    caret-color: var(--txt-white);
}

.dark-mode .shadow-lg,
.dark-mode .navbar a.navbar-brand,
.dark-mode .navbar a.toggle-switch,
.dark-mode .form-control,
.dark-mode .input-group-text,
.dark-mode .input-group-text i.fa-search,
.dark-mode ::placeholder,
.dark-mode .form-select,
.dark-mode #countryCard,
.dark-mode #countryCard .card-body,
.dark-mode #countryCard .card-title,
.dark-mode #countryCard .card-text,
.dark-mode #countryCard .card-text stong,
.dark-mode #countryCard .card-text strong span,
.dark-mode .back-button-wrap,
.dark-mode #backBtn,
.dark-mode #detailCard .card-footer .list-inline .list-inline-item a,
.dark-mode #backToTop,
.dark-mode .footer,
.dark-mode .footer .container,
.dark-mode .footer span {
    background-color: var(--ele-darkMode);
    color: var(--txt-white);
    caret-color: var(--txt-white);
}

/* Media Queries */

@media (min-width: 768px) and (max-width: 1025px) {

    /* Laptop Screen and higher (Desktop) */
    [class*="col-"] {
        width: 100%;
        height: auto;
    }
    
    .col-1 {
        width: 8.33%;
    }

    .col-2 {
        width: 16.66%;
    }

    .col-3 {
        width: 25%;
    }

    .col-4 {
        width: 33.33%;
    }

    .col-5 {
        width: 41.66%;
    }

    .col-6 {
        width: 50%;
    }

    .col-7 {
        width: 58.33%;
    }

    .col-8 {
        width: 66.66%;
    }

    .col-9 {
        width: 75%;
    }

    .col-10 {
        width: 83.33%;
    }

    .col-11 {
        width: 91.66%;
    }

    .col-12 {
        width: 100%;
    }
}

@media (min-width: 320px) and (max-width: 767px) {

    /* Mobile Screen (Portrait) and higher (Landscape) */
    [class*="col-"] {
        width: 100%;
        height: auto;
    }

    .navbar {
        margin-bottom: 50px;
    }

    #controls_container {
        display: block;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: start;
        padding-left: 30px;
    }

    #searchBox {
        width: 376px;
        margin-bottom: 50px;
    }

    #showCountries {
        width: 100%;
        margin: 0 auto;
        padding-left: 80px;
    }

    .detail-card {
        padding-left: 25px;
        padding-right: 25px;
        height: 100%;
    }

    #country_flag {
        height: 300px;
    }

    #countryName {
        margin-bottom: 15px;
    }

    #detailCard p.card-text {
        margin-bottom: 8px;
    }

    #detailCard .card-body {
        margin-bottom: 25px;
    }

    #detailCard .col-md-6:last-of-type {
        margin-top: 25px;
    }

    #detailCard .card-footer .card-text {
        display: flex;
    }
}