/* Dark theme */

[data-theme="dark"] {
    background-color: var(--bs-dark) !important;
    color: var(--bs-light) !important;
}
[data-theme="dark"] li {
    background: var(--bs-dark) !important;
    border-color: #444444 !important;
    color: var(--bs-light) !important;
}
[data-theme="dark"] input {
    background: var(--bs-dark) !important;
    border-color: #444444 !important;
    color: var(--bs-light) !important;
}
[data-theme="dark"] select {
    background: var(--bs-dark) !important;
    border-color: #444444 !important;
    color: var(--bs-light) !important;
}

/* Header */

.center-text {
    display: flex;
    justify-content: center;
    align-items: center;
}

body { background-color: #fafafa; }
main { padding-top: 4em; }
body > header
{
    height: 4em;
    color: white;

    background-color: #24292E;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    box-shadow: 0 1px 6px 0 rgba(0,0,0,0.4);
}

header i:hover { color: #fff; }
header > #right { position: absolute; right: 15px; }
#profile-img { border-radius: 50%; cursor: pointer; }

#title {
    cursor: pointer;
    font-family: Montserrat;
    font-size: 30px;

}

/* Separator */

hr
{
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Floating Button */

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;

    padding: 14px 20px;

    color: #fefefe;
    border-radius: 50px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.big-button {
    font-size: 16px;
    background-color: #525d67;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.big-button:hover {
    background-color: #374049;
}

#plus-svg {
    fill: white;
}

/* Containers */

.container {
    max-width: 600px;
    width: 100%;
    padding: 30px;
    margin-top: 30px;
}

.recipe-card {
    background-color: #ffffff;

    border-radius: 0.25rem;
    border: .0625rem solid #e4e9f2;

    border-top-style: solid;
    border-top-width: .25rem;
    border-top-color: #525d67;
}

.recipe-card h6 {
    font-size: 1.125rem;
    margin-top: 25px;
    margin-bottom: 20px;
}

.hoverable-card {
    text-decoration: none;
    padding: 15px 20px;
    width: 220px;

    transition: transform 0.2s;
}

.hoverable-card:hover {
    transform: scale(1.1);
}

/* Mobile layout */
@media (max-width: 600px) {
    .container {
        margin-top: 0px;
        border-top-style: none;
    }
}

/* Recipe Container */
.recipe-group {
    max-width: 75% !important;
    padding-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, 220px);
    grid-gap: 30px 40px;
    justify-content: left;

    margin: 25px auto 70px;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #ffd6a5;
    color: #333;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
}


/* New Recipe */

.form-group {
    margin-bottom: 20px;
}

.tag-list {
    border: 1px solid #ccc;
    padding: 10px 12px;
}
.tag-list:hover {
    border: 1px solid #ccc;
}

.add-group {
    position: absolute;
    top: 10px;
    right: 0px;
    text-align: center;
    display: block;
    font-size: 20px;
    cursor: pointer;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    opacity: 1;
    visibility: visible;
    display: block;

    background: white;
    border: 1px solid #ddd;
    border-top: none;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestions li {
    padding: 8px 12px;
    cursor: pointer;
}

.suggestions li:hover {
    background-color: #f0f0f0;
}

.ingredient-list {
    background-color: #fefefe;
    border-radius: 12px;
}

.recipe-link {
    padding: 4px 10px 4px 0;
    border-radius: 4px;
    color: #666;

    display: flex;
    gap: 10px;
    align-items: center;

    &:hover {
      background-color: #eee;
    }
}

.link {
    cursor: pointer;
}

.recipe-form h2 {
    display: block;
    font-weight: bold;
    margin-bottom: 12px;
    color: #555;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #ff7043;
    box-shadow: 0 0 5px rgba(255,112,67,0.3);
    outline: none;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    color: #fff;
    border-radius: 10px;
}

/* Recipe page */

.recipe-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.recipe-header {
    display: grid;
    grid-template:
        "name actions" auto
        "info info" auto / auto auto;
    grid-gap: 20px 0;
}

.recipe-header h1 {
    margin-bottom: 25px;
    grid-area: name
}

.additional {
    grid-area: info;
    display: flex;
    align-items: center;
    grid-gap: 0 30px;
}
.additional-item {
    display: flex;
    align-items: center;
    grid-gap: 0 10px;
}

.icon {
    width: 30px;
}

.additional-actions {
    grid-area: actions;
    justify-self: end;
}

.additional-actions i {
    cursor: pointer;
    margin: 15px;
}

.ingredient i {
    cursor: pointer;
    margin-left: 5px;
}

.steps li {
    margin-bottom: 25px;
    padding-left: 30px;
    font-size: 17px;
    line-height: 1.6;
}

.steps li::marker {
    font-weight: 700;
    font-size: 18px;
    color: teal;
}

.help-note {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
    white-space: pre-line;

    position: relative;
    padding: 1rem 1rem;
    margin-top: 0.5rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

/* Modal */

#modal
{
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content
{
    padding: 15px 40px 15px;
    background-color: #fefefe;
    position: absolute;
    width: max-content;
    top: 30%;
    left: 50%;
    transform: translate(-50%, 0px);
}
