* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: rgb(255, 249, 239);
}

body {
    position: relative;
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* prevents blur from leaking out */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url("../images/generated-image.png"); */
    /* background-image: url("../images/generated-item2.png"); */
    background-image: url("../images/generated-item3.png");
    background-size: cover;
    background-position: center;
    filter: blur(15px);        /* <<< blur amount */
    transform: scale(1.1);     /* prevents blurry edges */
    z-index: -1;               /* make it stay behind content */
}

div#wrapper {
    gap: 18px;
    display: flex;
    flex-direction: column;

    padding: 30px;
    width: 500px;
    height: 570px;
    background: rgba(191, 191, 191, 0.233);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

div#wrapper>header {
    align-self: center;
    font-size: 45px;
    margin-top: 10px;
}

div#wrapper>p#header-text {
    text-align: center;
}

div#conversion {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 40px
}

div#conversion img {
    align-self: center;
    justify-self: center;
    width: 50px;
}

div#enter-amount, div#conversion > div {
    width: 100%;    /* make each inner block stretch full width */
}

input {
    outline: none;
    box-shadow: none;
    font-size: 16px;
    border: none;
    background-color: rgba(255, 255, 255, 0.328);
    width: 100%;
    padding: 20px;
    border-radius: 8px;
}

section > p {
    font-size: large;
}

button#switch {
    align-self: center;
    margin-top: 25px;
    width: 130px;
    height: 50px;
    
    border: none;
    border-radius: 50%;
    
    background-color: transparent;
    background-image: url("../images/left-and-right-arrows.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    
    transition: transform 0.3s;
}
button#switch:hover {
    transform: scale(1.05);
}

button#exchange {
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 0, 0, 0.675);
    padding: 20px;
    cursor: pointer;
    transition: background 1s ease, transform 0.3s ease;
}
button#exchange:hover {
    background-color: rgba(255, 0, 0, 0.973);
    transform: scale(1.01);
}

.user-select {
    user-select: none;
}

/*################# spinner & error ##################*/

/* Spinner inside the paragraph while getting the exchange rate from the API */
#result .spinner {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#result.error {
    color: #ff0000;
    font-size: 17.5px;
    font-style: italic;
    text-shadow: 1px 1px 25px black, -1px -1px 25px rgb(0, 0, 0);
}

/*################# auto-complete ##################*/

.autocomplete-suggestions {
    position: absolute;
    background-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.328),
        rgba(255, 0, 0, 0.675)
    );

    border: none;
    border-radius: 0px 0px 8px 8px;
    max-height: 150px;
    overflow: auto;
    width: 31.3%;
    font-size: 16px;
}

.autocomplete-suggestion {
    padding-left: 20px;
    padding-bottom: 8px;
    cursor: pointer;
}

.autocomplete-suggestion:hover {
    background-color: #ffffff26;
}
