* { 
    box-sizing: border-box;
}

:root, html, body {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg);
    margin: 0;
    transition: background 0.3s, color 0.3s;
    height: 100vh;
    --txt: #000;
    --txt2: #aaa;
    --bg: #f4f4f4;
    --bg2: #fefefe;
    --bg3: #fff;
    --bradius: 4px;
    color: var(--txt);
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.content {
    max-width: 40ch;
    width: 90%;

}

.dark-mode {
    --bg: #000;
    --bg2: #111;
    --bg3: #222;
    --txt: #f4f4f4;
    ---txt2: #eee;
}

.icon {
    fill: var(--txt);
}

h1, h2 {
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    /*justify-content: center;*/
    margin-bottom: 20px;
    position: relative;
}

input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--txt);
    border-radius: var(--bradius);
    background-color: var(--bg2);
    color: var(--txt);
}

.searchInputWrapper {
    width: 100%;
    position: relative;
}

#searchInput {
    padding-left: calc(10px + 20px);
}

.iconWrapper {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.barIcon {
    height: 60%;
    display: none;
}

.searchInputWrapper.search > .iconWrapper > .iconSearch {
    display: block;
}

.searchInputWrapper.url > .iconWrapper > .iconUrl {
    display: block;
}

.ssuggest {
    border: 1px solid var(--txt);
    border-top: 0;
    border-radius: var(--bradius);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    display: none;
    background-color: var(--bg2);
    position: absolute;
    top: 100%;
    width: 100%;
}

.ssuggestList {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gaps: 2px;
    padding: 8px;
}

.ssuggestList li {
    margin: 0;
    padding: 0;
    padding: 6px;
}

.showSsuggest input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.showSsuggest .ssuggest {
    display: block;
}

button {
    padding: 10px 15px;
    border: none;
    background: none;
    color: var(--txt);
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: var(--txt-opacity);
}

#favoritesList {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}


.actionButtons {
    position: absolute;
    top: env(safe-area-inset-top);
    right: 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
}

#favoritesList li {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--txt);
    padding: 8px;
    text-align: center;
}

a {
    color: var(--txt);
    text-decoration: underline;
    text-align: center;
}

.dialog {
    display: none; /* Hidden by default */
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.dialog-content {
    background-color: var(--bg2);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--txt);
    width: 80%;
    max-width: 500px;
    border-radius: var(--bradius);
}

.close-button {
    color: var(--txt2);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}