/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px;
    background-color: #fff;
    margin-top: 30px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #333;
}

form {
    display: flex;
    flex-direction: column;
}

input[type="text"],
input[type="number"],
textarea,
select {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}


button {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #28a745;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
}

button:hover {
    background-color: #218838;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f8f8f8;
}

/* Icon Buttons */
button img {
    width: 20px;
    height: 20px;
}

#description{
    height: auto;
    min-height: 100px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
    }

    table, th, td {
        font-size: 14px;
    }

    button {
        font-size: 14px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Ingredient Row */
.ingredient-template {
    display: none;
    align-items: center;
    gap: 10px;
}

button.remove {
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    padding: 8px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
    height: auto;
    box-sizing: content-box;
}


/*tags */


.tags {
    width: 300px;
    position: relative;
}

#searchTagsInput {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tagTemplate{
    display:none;
}

.selectedTags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}



/* Styling the input box */
#searchTagInput {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
}

/* Dropdown container */
#dropdownTags {
    position: relative;
    width: 100%;
}

/* Styling the dropdown menu */
#dropdownTags ul {
    position: absolute;
    top: 100%; /* Positions dropdown directly below the input */
    width: 100%;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    padding: 0;
    margin: 5px 0 0;
    list-style-type: none;
    display: none; /* Initially hidden; toggle with JavaScript */
    z-index: 1000; /* Ensures dropdown appears above other elements */
}

/* Individual dropdown list item */
#dropdownTags ul li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

/* Hover effect for dropdown items */
#dropdownTags ul li:hover {
    background-color: #f0f0f0;
}

h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Form Toggle Buttons */
.form-toggle {
    margin-bottom: 20px;
}

.form-toggle button {
    padding: 10px 20px;
    margin: 0 5px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-toggle button:hover {
    background-color: #0056b3;
}

/* Form Containers */
.form-container {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-container h3 {
    margin-bottom: 15px;
    color: #333;
}

label {
    display: block;
    margin: 10px 0 5px;
    text-align: left;
    color: #333;
}

/* Input Fields */
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #007bff;
    outline: none;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #218838;
}

.error-message {
    color: #ff4d4f;
    background-color: #ffd6d6;
    padding: 10px;
    border: 1px solid #ff4d4f;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.dashboard-button {
    position: absolute;
    top: 30px;
    right: 10%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.dashboard-button:hover {
    background-color: #0056b3;
}

.dashboard-button:active {
    background-color: #004494;
}


.logout-button {
    position: absolute;
    top: 50px;
    right: 10%;
    padding:10px;
    background-color: #dc3545;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.logout-button:hover {
    background-color: #c82333;
}

.logout-button:active {
    background-color: #a71d2a;
}
