/* Importing a nice font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    --ameed-red: #CF152D;
    --ameed-black: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #F6F6F6;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--ameed-black);
    color: var(--ameed-red);
    padding: 20px;
    text-align: center;
}

img {
    width: 140px;
}

h6 {
    margin: 0;
    font-size: 1.2em;
}

/* Main content area */
main {
    padding: 20px;
}

/* Styles for select and lists */
select,
ul {
    width: 70%;
    margin: 0 auto 20px;
    display: block;
}

select {
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid var(--ameed-red);
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

select:focus {
    outline: none;
    border-color: #f1faee;
    box-shadow: 0 0 5px rgba(229, 97, 70, 0.5);
}

/* List styles */
ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

li {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

li:hover {
    background-color: var(--ameed-red);
    color: #fff;
}

/* Styles for tables */
table {
    width: auto;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table th,
table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: var(--ameed-red);
    color: #fff;
}

/* Input fields within tables */
table td input[type="text"],
table td input[type="number"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

table td input[type="checkbox"] {
    transform: scale(1.2);
}

/* Styles for buttons */
button {
    background-color: var(--ameed-red);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #d62839;
}

/* button:focus {
    outline: 2px solid #f1faee;
    outline-offset: 2px;
} */

/* Styles for form sections */
#addProductForm,
#addAddonForm {
    width: 70%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#addProductForm label,
#addAddonForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Form input fields */
#addProductForm input[type="text"],
#addProductForm input[type="number"],
#addProductForm select,
#addAddonForm input[type="text"],
#addAddonForm input[type="number"],
#addAddonForm select {
    width: calc(100% - 20px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

#addProductForm button[type="submit"],
#addProductForm button[type="button"],
#addAddonForm button[type="submit"] {
    background-color: var(--ameed-red);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    margin-top: 10px;
}

#addProductForm button[type="submit"]:hover,
#addAddonForm button[type="submit"]:hover {
    background-color: #d62839;
}

/* Styles for size entry */
#sizesContainer {
    margin-top: 20px;
}

.size-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.size-input label {
    margin-right: 10px;
    font-weight: bold;
}

.size-input input[type="text"],
.size-input input[type="number"] {
    margin-right: 10px;
    flex: 1;
}

.size-input .remove-size-button {
    background-color: var(--ameed-red);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.size-input .remove-size-button:hover {
    background-color: #d62839;
}

/* Styles for new add-on section */
#addAddonSection {
    margin-top: 20px;
}

#addAddonSection button.collapsible {
    margin-bottom: 10px;
}

/* Add-On form specific styles */
#addAddonForm input[type="text"],
#addAddonForm input[type="number"],
#addAddonForm select {
    width: calc(100% - 20px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

/* Styles for managing add-ons section */
#manageAddonsSection {
    margin-top: 20px;
}

#manageAddonsSection button.collapsible {
    margin-bottom: 10px;
}

#manageAddonsSection .form-group {
    margin-bottom: 15px;
}

/* Styles for checkboxes in manage add-ons section */
#manageAddonsSection input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 10px;
    vertical-align: middle;
}

/* Styles for collapsible sections */
.collapsible {
    cursor: pointer;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--ameed-red);
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.collapsible.active,
.collapsible:hover {
    background-color: #d62839;
    color: #fff;
}

.content {
    display: none;
    padding: 15px;
    border-top: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    background-color: #f1f1f1;
}

.content.show {
    display: block;
}


/* Ensure all input fields are larger */
#addProductForm input[type="text"],
#addProductForm input[type="number"],
#addAddonForm input[type="text"],
#addAddonForm input[type="number"],
#addProductForm select,
#addAddonForm select {
    width: calc(100% - 24px);
    /* Increased width for better alignment */
    padding: 14px;
    /* Increased padding for better usability */
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 20px;
    /* Increased margin for better spacing */
    font-size: 1.1em;
    /* Increased font size for better readability */
}

/* Textareas for descriptions */
#addProductForm textarea,
#addAddonForm textarea {
    width: calc(100% - 24px);
    /* Same width as other fields */
    padding: 14px;
    /* Same padding as other fields */
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 20px;
    /* Same margin as other fields */
    font-size: 1.1em;
    /* Same font size as other fields */
    resize: vertical;
    /* Allow vertical resizing */
    min-height: 100px;
    /* Set a minimum height */
    overflow: auto;
    /* Add scroll if content exceeds size */
}

/* Specific styles for input fields in the product and add-on forms */
#addProductForm input[type="text"],
#addProductForm input[type="number"],
#addAddonForm input[type="text"],
#addAddonForm input[type="number"] {
    height: 50px;
    /* Increased height for better visibility */
    line-height: 1.5;
    /* Improved line height for readability */
}

/* Adjustments for input fields in tables */
table td input[type="text"],
table td input[type="number"] {
    width: 100%;
    /* Full width to fit the table cell */
    padding: 8px;
    /* Adequate padding */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    /* Font size for table inputs */
    overflow: hidden;
    /* Hide overflow for better appearance */
}

/* Styles for buttons */
button {
    background-color: var(--ameed-red);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

button:hover {
    background-color: #d62839;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    /* Darker shadow on hover */
}

/* button:focus {
    outline: 2px solid #f1faee;
    outline-offset: 2px;
} */

/* Styles for form sections */
#addProductForm,
#addAddonForm {
    width: 70%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

/* Styles for tables */
table {
    width: auto;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

/* Styles for list items */
li {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
    transition: background-color 0.3s, color 0.3s;
}

li:hover {
    background-color: var(--ameed-red);
    color: #fff;
}

/* Styles for size entry */
.size-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

/* Styles for collapsible sections */
.collapsible {
    cursor: pointer;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--ameed-red);
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

.collapsible.active,
.collapsible:hover {
    background-color: #d62839;
    color: #fff;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    /* Darker shadow on hover */
}

/* Styles for textareas */
textarea {
    width: 100%;
    padding: 14px;
    /* Same padding as input fields */
    border: 1px solid #ddd;
    /* Same border style */
    border-radius: 5px;
    /* Same border radius */
    box-sizing: border-box;
    /* Same box-sizing for consistent sizing */
    margin-bottom: 20px;
    /* Same margin as input fields */
    font-size: 1.1em;
    /* Same font size for consistency */
    resize: vertical;
    /* Allow vertical resizing */
    min-height: 100px;
    /* Set a minimum height for usability */
    overflow: auto;
    /* Add scroll if content exceeds size */
    background-color: #fff;
    /* Background color consistent with input fields */
    color: #333;
    /* Text color consistent with input fields */
    transition: border-color 0.3s, box-shadow 0.3s;
    /* Smooth transitions */
}

/* Focus state for textareas */
textarea:focus {
    border-color: #f1faee;
    /* Change border color on focus */
    box-shadow: 0 0 5px rgba(229, 97, 70, 0.5);
    /* Add focus shadow */
    outline: none;
    /* Remove default outline */
}

/* Specific adjustments for textareas within forms */
#addProductForm textarea,
#addAddonForm textarea {
    width: calc(100% - 24px);
    /* Adjusted for form fields */
    padding: 14px;
    /* Consistent padding */
    border: 1px solid #ddd;
    /* Consistent border */
    border-radius: 5px;
    /* Consistent border radius */
    box-sizing: border-box;
    /* Ensure consistent sizing */
    margin-bottom: 20px;
    /* Consistent margin */
    font-size: 1.1em;
    /* Consistent font size */
    resize: vertical;
    /* Allow resizing */
    min-height: 100px;
    /* Minimum height */
    overflow: auto;
    /* Overflow handling */
}

#buttonsSection {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

/* Styles for the Add Branch Section */
#addBranchSection {
    margin-top: 20px;
}

#addBranchContent {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px auto;
}

/* Form Group Styling */
#addBranchForm .form-group {
    margin-bottom: 20px;
}

#addBranchForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

#addBranchForm input[type="text"] {
    width: calc(100% - 24px);
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1.1em;
    margin-bottom: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#addBranchForm input[type="text"]:focus {
    border-color: #f1faee;
    box-shadow: 0 0 5px rgba(229, 97, 70, 0.5);
    outline: none;
}

/* Button Styles */
#addBranchForm button[type="submit"] {
    background-color: var(--ameed-red);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#addBranchForm button[type="submit"]:hover {
    background-color: #d62839;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    #addBranchContent {
        padding: 15px;
        margin: 10px;
    }

    #addBranchForm input[type="text"] {
        font-size: 1em;
    }

    #addBranchForm button[type="submit"] {
        padding: 12px 18px;
        font-size: 1em;
    }
}

/* Custom Alert Box Styles */
.custom-alert {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    /* Black background with opacity */
}

.custom-alert-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow for consistency */
}

.custom-alert-content span {
    display: block;
    margin-bottom: 20px;
    font-size: 1.2em;
    /* Consistent with other text */
    color: var(--ameed-black);
    /* Text color */
}

.custom-alert-content button {
    background-color: var(--ameed-red);
    /* Consistent with button styles */
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, box-shadow 0.3s;
    /* Smooth transitions */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Added shadow */
}

.custom-alert-content button:hover {
    background-color: #d62839;
    /* Darker red for hover effect */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    /* Darker shadow on hover */
}

.custom-alert-content button:focus {
    outline: 2px solid #f1faee;
    outline-offset: 2px;
}
/* CSS for loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    z-index: 1000;
    /* Ensure it's on top of other content */
}

.loading-overlay p {
    color: white;
    font-size: 18px;
    margin-top: 10px;
}

/* Loader styles */
.loader {
    width: 160px; /* Increased width */
    height: 30px; /* Increased height */
    transform: skewX(-45deg);
    background:
        linear-gradient(var(--ameed-red) 0 0) left -30px top 0/30px 30px no-repeat #ccc;
    animation: l3 0.5s infinite linear;
    margin: auto;
    position: relative;
    top: 50%;
    border: 1px solid var(--ameed-black); /* Border with color */
    border-radius: 5px; /* Rounded corners for the border */
    box-shadow: 0 0 20px rgba(207, 21, 45, 0.5); /* Glow effect */
}

@keyframes l3 {
    100% {
        background-position: right -30px top 0;
    }
}