/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Universal Font Sizes */
body {
    font-size: 1rem; /* Base font size */
    line-height: 1.6;
    color: #333; /* Text color */
    background-color: #f4f4f4; /* Background color */
}

/* Header Styles */
h1, h2 {
    margin-bottom: 10px;
    color: #4CAF50;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Paragraph and Section Spacing */
p {
    margin-bottom: 1em; /* Space after each paragraph */
}

section {
    margin-bottom: 20px; /* Space between sections */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button Styling */
button, .button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover, .button:hover {
    background-color: #45a049;
}

/* Input Field Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Link Styling */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer Styling */
footer {
    padding: 20px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    width: 100%;
    background-color: #333;
    color: white;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Suggestions */
.suggestions {
    border: 1px solid #ddd;
    background: white;
    position: absolute;
    z-index: 1000;
    max-height: 150px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    border-radius: 4px;
}

.suggestions-box {
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    background: white;
    z-index: 1000;
    top:100%;
    width: 100%;
}

.suggestion-item {    
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

.suggestion-item.highlight {
    background-color: #4CAF50; /* Highlight color */
    color: white;
}

.suggestion-item.highlighted {
    background-color: #d3d3d3;
}

/* Item Row Styling */
.item-row {
    display: flex;
    align-items: center; /* Aligns items vertically */
    justify-content: space-between; /* Adds space between items */
    gap: 15px; /* Adjust gap between elements */
    margin-bottom: 10px; /* Adds spacing between rows */
    border: none; /* Remove unintended borders */
}

/* Stock Info Row */
.stock-info-row {
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: green;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column; /* Align label and input */
    position: relative;
    margin-bottom: 10px;
}

/* Remove Button */
.remove-item-button {
    background-color: #f44336; /* Red button */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.3s ease;
}

.remove-item-button:hover {
    background-color: #d32f2f;
}

/* Miscellaneous Fix */
.admin-only {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#resultMessage {
    margin-top: 20px;
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

/* Fix for Line Extensions */
.item-row,
.form-group,
.suggestions {
    width: 100%; /* Ensure elements stay inside the container */
    max-width: 100%; /* Prevent overflow */
    box-shadow: none; /* Remove any unintended visual effects */
}
