/* General Reset & Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    color: #333;
}

main {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

/* Form Container */
form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
form p {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 20px;
}

h1 {
    font-size: 1.5rem;
    padding: 20px 0;
    margin-left: 20px;
    color: #2c3e50;
}

h3 {
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
    margin-top: 30px;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Layout Grid for Customer Info */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Input Styling */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    position: relative; /* CRITICAL: Acts as an anchor line for the absolute dropdown floating above it */
}

/* 
   NEW: Address Autocomplete Scroll Menu Fix
   Forces the address list visible in image_698907.png to float over 
   the fields below rather than breaking the layout layout.
*/
.input-group ul {
    position: absolute;
    top: 100%;                  /* Locks it directly under the input field */
    left: 0;
    width: 100%;                /* Forces the box to match the input width perfectly */
    max-height: 220px;          /* Limits height so it turns into a compact scroll menu */
    overflow-y: auto;           /* Triggers the vertical scrollbar */
    background-color: #ffffff;  /* Solid background so form inputs don't bleed through */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;               /* Pops it above everything else on the layer scheme */
    margin: 5px 0 0 0;
    padding: 0;
    list-style-type: none;      /* Strips out the default bullet points from image_698907.png */
}

/* Styling for the individual address items inside the menu */
.input-group ul li {
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.input-group ul li:last-child {
    border-bottom: none;
}

/* Clean interactive highlight on arrow-down or hover actions */
.input-group ul li:hover {
    background-color: #3498db;
    color: #ffffff;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.3s;
}
select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    appearance: none; 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem; /* Space for the arrow */
    cursor: pointer;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Required Star */
.required {
    color: #e74c3c;
    margin-left: 3px;
}

/* Button Styling */
.update-btn {
    background-color: #2c3e50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    transition: background 0.3s;
}

.update-btn:hover {
    background-color: #34495e;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    form {
        padding: 20px;
    }
}

/*Navbar top menu */
.navbar ul{
    list-style-type: none;
    background-color: hsl(0, 0%, 25%);
    padding: 0px;
    margin: 0px;
    overflow: hidden;
}
.navbar a{
    color: white;
    text-decoration: none;
    padding: 15px;
    display: block;
    text-align: center;
}
.navbar a:hover{
    background-color: hsl(0, 0%, 10%);
}
.navbar li{
    float: left;    
}

input[readonly] {
    background-color: #eaeded; /* Subtle, clean gray background */
    color: #7f8c8d;            /* Muted text color */
    border-color: #d5dbdb;     /* Softened border */
    cursor: not-allowed;       /* Changes the cursor to a 'no' sign on hover */
    box-shadow: none !important; /* Prevents focus glow animations */
}

/* Prevents the border from changing color if a user clicks into a readonly field */
input[readonly]:focus {
    border-color: #d5dbdb;
}
