* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

*:focus {
    outline: none;
}

body {
    background-color: bisque;
}

html, body {
    height: 100%;
    overflow: hidden;
}

header {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2.5%;
    background-color: burlywood;
    color: bisque;
    border-bottom: 5px dashed saddlebrown; 
}

.header-links, .header-logged-in-links {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.header-links a, .header-logged-in-links a {
    text-decoration: none;
    background-color: bisque;
    color: saddlebrown;
    padding: 5px 10px;
    border-radius: 10px;
    border: 3px dashed saddlebrown;
    cursor: pointer;
}

.header-logged-in-links {
    display: none;
}

.header-logged-in-links button {
    text-decoration: none;
    background-color: transparent;
    color: saddlebrown;
    outline: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.header-logged-in-links button:focus, .header-logged-in-links button:hover {
    text-decoration: underline;
}


.header-links a:hover, .header-links a:focus, .header-logged-in-links a:hover, .header-logged-in-links a:focus {
    border: 3px solid saddlebrown;
    text-decoration: underline;
}

.header-recipy-link {
    text-decoration: none;
    color: bisque;
    cursor: pointer;
}

.header-recipy-h1 {
    text-shadow: 2px 2px saddlebrown;
}

.header-recipy-link:hover, .header-recipy-link:focus {
    text-decoration: underline;
}

.recipes {
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 50px;
    padding-bottom: 50px;
    gap: 50px;
    justify-content: center;
    overflow: auto;
}

.user-title, .me-user-title {
    height: 36px;
    margin: 50px;
    color: saddlebrown;
    text-align: center;
}

.user-recipes, .me-user-recipes {
    height: calc(100vh - 196px);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0px 50px 50px 50px;
    padding-bottom: 50px;
    gap: 50px;
    justify-content: center;
    overflow: auto;
}

.me-user-recipes {
    height: calc(100vh - 236px);
}

.me-user-title {
    margin-bottom: 0px;
}

.me-user-recipes {
    display: none;
}

.me-user-info {
    display: none;
    flex-direction: column;
    gap: 2px;
    font-size: 16px;
    margin: 24px 50px;
    color: saddlebrown;
    font-weight: bold;
}

.me-api-key-wrapper, .me-recipe-count-wrapper {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.me-api-key-text {
    display: block;
    font-size: 16px;
    color: saddlebrown;
    border: none;
    outline: none;
    border-radius: 6px;
    background-color: blanchedalmond;
    cursor: pointer;
    filter: blur(4px);
    padding: 2px 8px;
    transition: filter ease-in-out 0.2s; 
}

.me-api-key-text:hover {
    filter: none;
}

.recipe, .show-create-recipe {
    width: 400px;
    overflow: hidden;
    border: 4px dashed saddlebrown;
    border-radius: 30px;
    background-color: blanchedalmond;
    cursor: pointer;
    box-shadow: 3px 3px 20px -8px saddlebrown;
    height: 400px;
}

.show-create-recipe {
    display: grid;
    place-items: center;
    font-size: 300px;
    color: saddlebrown;
}

.show-create-recipe:hover, .show-create-recipe:focus {
    border: 4px solid saddlebrown;
}

.recipe-image {
    background-image: url(/static/resources/noImage.png);
    width: 400px;
    height: 200px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: 4px dashed saddlebrown;
}

.recipe-info {
    width: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 160px;
}

.recipe-title {
    color: saddlebrown;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-ingredients {
    font-weight: normal;
    font-size: 12px;
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-description {
    flex: 1;
    max-height: 75px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden; 
}

.recipe-username {
    width: 100%;
    display: block;
    color: saddlebrown;
    padding: 6px 12px;
    text-align: center;
    font-weight: bold;
    background-color: blanchedalmond;
    text-decoration: none;
}

.recipe:hover, .recipe:has(.recipe-username:focus), .recipe:has(.recipe-title:focus) {
    border: 4px solid saddlebrown;
}

.recipe:hover .recipe-image, .recipe:has(.recipe-username:focus) .recipe-image, .recipe:has(.recipe-title:focus) .recipe-image {
    border-bottom: 4px solid saddlebrown;
}

.recipe:hover:not(:has(.recipe-username:hover)) .recipe-title {
    text-decoration: underline;
}

.recipe:has(.recipe-username:hover) .recipe-title {
    text-decoration: none;
}

.recipe-username:hover, .recipe-username:focus, .recipe-title:focus {
    text-decoration: underline;
}

.register-center, .login-center {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100svh;
    top: 60px;
    left: 0px;
    position: fixed;
}

.register-area, .login-area {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items:  center;
    gap: 30px;
}

.register-text, .login-text {
    color: saddlebrown;
    text-align: center;
    margin: 20px 0px;
}

.register-inputs, .login-inputs {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.register-page-login-text, .login-page-register-text {
    position: fixed;
    color: saddlebrown;
    font-weight: bold;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.register-page-login-link, .login-page-register-link {
    color: cadetblue;
    text-decoration: none;
}

.register-page-login-link:hover, .register-page-login-link:focus, .login-page-register-link:hover, .login-page-register-link:focus {
    text-decoration: underline;
}

.register-name-button, .register-name, .login-key-button, .login-key {
    text-decoration: none;
    background-color: blanchedalmond;
    color: saddlebrown;
    padding: 5px 10px;
    border-radius: 10px;
    border: 3px dashed saddlebrown;
    cursor: pointer;
    font-size: 16px;
}

.register-name, .login-key {
    cursor: text;
}

.register-info, .login-info {
    color: saddlebrown;
    font-weight: bold;
    text-wrap: wrap;
    max-width: 400px;
    display: none;
}

.register-name-button:hover, .register-name-button:focus, .login-key-button:hover, .login-key-button:focus {
    text-decoration: underline;
    border: 3px solid saddlebrown;
} 

.register-name:hover, .register-name:focus, .login-key:hover, .login-key:focus {
    border: 3px solid saddlebrown;
}

.recipe-full-container {
    width: 100%;
    height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    margin: 50px 0px;
}

.recipe-full {
    width: 80%;
    height: 100%;
    overflow: auto;
    border: 4px solid saddlebrown;
    border-radius: 30px;
    background-color: blanchedalmond;
    box-shadow: 3px 3px 20px -8px saddlebrown;
    display: none;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

.recipe-full-error {
    color: saddlebrown;
}

.recipe-info-full {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recipe-image-full {
    flex-shrink: 0;
    background-image: url(/static/resources/noImage.png);
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 300px;
    border-bottom: 4px solid saddlebrown;
    display: none;
}

.recipe-title-full {
    color: saddlebrown;
    font-size: 32px;
    font-weight: bold;
}

.recipe-username-full {
    color: saddlebrown;
    font-weight: bold;
    text-decoration: none; 
    cursor: pointer;
}

.recipe-username-full:hover {
    text-decoration: underline;
}

.recipe-username-full-wraper {
    color: saddlebrown;
}

.recipe-description-full {
    margin-top: 8px;
    color: saddlebrown;
}

.recipe-ingredients-full {
    margin-top: 8px;
    color: saddlebrown;
    font-weight: bold;
}

.recipe-ingredients-list {
    margin: 4px 16px;
    font-weight: normal;
}

.recipe-instructions-full {
    color: saddlebrown;
    margin: 0px 0px;
    width: 100%;
}

hr {
    border: 2px solid saddlebrown;
}

::-webkit-scrollbar {
    display: none;
}

.recipe-creator-form-background, .recipe-editor-form-background {
    position: absolute;
    display: none;
    place-items: center;
    padding: 60px 60px 120px 60px;
    top: 60.8px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background-color: #00000088;
}

.recipe-creator-form, .recipe-editor-form {
    display: flex;
    gap: 24px;
    width: 100%;
    height: 100%;
    background-color: bisque;
    border: 4px solid saddlebrown;
    border-radius: 50px;
    padding: 30px 50px;
    color: saddlebrown;
    flex-direction: column;
    overflow-y: scroll;
}

.recipe-creator-title-button, .recipe-editor-title-button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.recipe-creator-exit-button, .recipe-editor-exit-button {
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 36px;
    color: saddlebrown;
    font-weight: bold;
    cursor: pointer;
}

.recipe-creator-exit-button:focus, .recipe-editor-exit-button:focus {
    text-decoration: underline;
}

.recipe-creator, .recipe-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0px 20px;
}

label {
    font-weight: bold;
}

textarea {
    resize: vertical;
}

.form-input-grouping {
    display: flex; 
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 8px;
}

.form-input-grouping input[type="text"], .form-input-grouping input[type="url"] {
    flex: 1;
    background-color: blanchedalmond;
    color: saddlebrown;
    border: 3px dashed saddlebrown;
    border-radius: 8px;
    padding: 4px 8px;
}

.form-input-grouping input[type="text"]:hover, .form-input-grouping input[type="url"]:hover, .form-input-grouping input[type="text"]:focus, .form-input-grouping input[type="url"]:focus {
    border: 3px solid saddlebrown;
} 

.form-recipe-title {
    font-weight: bold;
}

.form-input-grouping input[type="checkbox"] {
    cursor: pointer;
    border: 3px solid saddlebrown;
    -webkit-appearance: none;
    appearance: none;
    margin: 0px;
    background-color: burlywood;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: grid;
    place-items: center;
}

.form-input-grouping input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 1px;
    transform: scale(0);
    transition: transform ease-in-out 0.15s;
    box-shadow: inset 1em 1em saddlebrown;
}

.form-input-grouping input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.form-textarea-grouping {
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.form-textarea-grouping textarea {
    border: 3px dashed saddlebrown;
    background-color: blanchedalmond;
    color: saddlebrown;
    padding: 4px 8px;
    border-radius: 8px;
}

.form-textarea-grouping textarea:hover, .form-textarea-grouping textarea:focus {
    border: 3px solid saddlebrown;
}

.form-button-grouping {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.form-button-grouping button {
    border: 3px dashed saddlebrown;
    padding: 4px 8px;
    border-radius: 8px;
    color: saddlebrown;
    font-weight: bold;
    background-color: blanchedalmond;
    cursor: pointer;
}

.form-button-grouping button:hover, .form-button-grouping button:focus {
    border: 3px solid saddlebrown;
}

.recipe-full-buttons {
    display: none;
    flex-direction: row;
    gap: 8px;
    margin: 4px 0px;
}

.recipe-full-buttons button {
    border: 3px dashed saddlebrown;
    padding: 4px 8px;
    border-radius: 8px;
    color: saddlebrown;
    font-weight: bold;
    cursor: pointer;
}

.recipe-full-edit {
    background-color: blanchedalmond;
}

.recipe-full-delete {
    background-color: lightsalmon;
}

.recipe-full-buttons button:hover, .recipe-full-buttons button:focus {
    border: 3px solid saddlebrown;
}