* {
    margin: 0;
}

:root {
    --white: hsl(0, 100%, 100%);
    --background: hsl(0, 0%, 98%);
    --text: hsl(200, 15%, 8%);
    /*for input fields */
    --element: var(--white);
    /*html elements except input field */
    --border: #cccccc;
}

.dark-mode {
    --background: hsl(207, 26%, 17%);
    --text: var(--white);
    --element: hsl(209, 23%, 22%);
}

body {
    background-color: var(--background);
    color: var(--text);
    font-size: 16px;
    /* margin: 2rem;; setting margin for the entire body doesnt set the background colour. So set the padding for each section seperately*/
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--element);
    padding: 2rem;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.main {
    padding: 2rem;
}

#searchFilter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

#countries {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-top: 2rem;
}

.card {
    box-sizing: border-box;
    width: 20rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    background-color: var(--element);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}


.card-content {
    display: flex;
    flex-direction: column;
    align-items: left;
    padding-top: 1rem;
    padding-left: 1rem;
    ;
}

.card-content>h2 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

img {
    max-width: 100%;
    /*image grow upto 100% of its parent's width, not beyond that. */
    height: auto;
    cursor: pointer;

}

#search-container {
    position: relative;
}

#search-container>i {
    position: absolute;
    left: 1rem;
    top: 30%;
}

.country-details-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.country-details-container>img {
    width: 30rem;

}

.country-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

p {
    margin: 0.5rem;
}

.border-countries {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    /* justify-content: space-between; */
    gap: 1rem;
    padding-top: 1rem;;
}

.items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0 2rem 0;
}

button {
    cursor: pointer;
    padding: 0.7rem;
    border-radius: 3px;
    border: 1px solid var(--border);
    box-shadow: inset 1px 1px 3px var(--border);
    padding-right: 1.5rem;;
    padding-left: 1.5em;
}

input,
select {
    width: 12rem;
    height: 2rem;
    box-shadow: inset 1px 1px 3px var(--border);
    border-radius: 5px;
    background-color: var(--element);
    text-align: center;
    color: var(--text);
    /* cursor: pointer; */
}

#backLink {
    margin-bottom: 1rem;
}