/* Forms CSS file - Contains styles for forms and form-related components */

/* --- ADDED: Styles for Delivery/Comment Row --- */
.delivery-comment-row {
    display: flex;          /* Arrange items horizontally */
    flex-wrap: wrap;        /* Allow wrapping on smaller screens if needed */
    gap: 20px;              /* Space between items */
    align-items: baseline;  /* <-- CHANGED: Align based on text baseline */
    margin-bottom: 20px;    /* Space below the row */
    background-color: #f9f9f9; /* <-- ADDED: Match product item background */
    padding: 15px;          /* <-- ADDED: Match product item padding */
    border-radius: 5px;     /* <-- ADDED: Match product item border-radius */
}

.delivery-comment-row .form-group {
    flex: 1;                /* Distribute space among items */
    min-width: 180px;       /* Adjust min-width slightly */
    margin-bottom: 0;       /* Remove default bottom margin from form-group */
}

/* Adjust the comment textarea specifically */
.delivery-comment-row .form-group textarea#orderComment {
    resize: none;           /* Disable resizing */
    height: auto;           /* Let rows attribute control initial height */
    min-height: 50px;       /* Ensure it doesn't collapse too much */
    width: 100%;            /* Ensure textarea fills its flex container */
}

/* Remove styles previously targeting the combined .delivery-options */
/* 
.delivery-comment-row .delivery-options {
    flex-grow: 1.5; 
}
.delivery-options {
    display: flex;
    flex-direction: column; 
    gap: 5px; 
}
.delivery-options label {
    display: block; 
    margin-bottom: 3px;
}
.delivery-options select {
    width: 100%; 
}
*/
/* --- END ADDED --- */

/* Comment area styles */
.comment-area {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
}

.comment-area textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

/* Price list form styles */
.price-list-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 5px;
}

.price-list-form input {
    margin-bottom: 10px;
}

/* Product grid layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.product-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

/* Order summary styles */
.summary {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 5px;
}

.summary ul {
    list-style-position: inside;
    padding-left: 0;
    margin: 10px 0;
}

.summary li {
    padding: 5px 0;
}

/* Total price display */
.total-price {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    text-align: right;
}

/* Button groups */
.confirmation-buttons,
.admin-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirmation-buttons button,
.admin-buttons button {
    flex: 1;
}

.logout-button {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

/* Admin login button */
#adminLoginBtn {
    background-color: #6c757d;
    max-width: 200px;
    margin-left: auto;
    margin-right: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    position: relative;
    z-index: 1000;
}

#adminLoginBtn.show {
    display: block;
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-input {
        min-width: 100%;
    }
}

/* --- ADDED: Styles for Email Confirmation Section --- */
.email-confirmation-section {
    margin-top: 25px; /* Increased top margin */
    padding: 20px; /* Increased padding */
    /* background-color: var(--light-color); */ /* Use light theme color */
    background-color: #FFC300; /* Soft Yellow */
    border: 1px solid #ccc; /* Changed border to subtle grey */
    border-radius: 8px; /* Slightly larger radius */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.email-confirmation-section p {
    margin-bottom: 15px; /* Space below the paragraph */
}

.email-input-group {
    display: flex;
    /* align-items: center; */
    align-items: baseline; /* Align based on text baseline */
    gap: 10px;
}

.email-input-group label {
    flex-shrink: 0; /* Prevent label from shrinking */
    margin-bottom: 0; /* Remove default bottom margin */
}

.email-input-group input[type="email"] {
    flex-grow: 1; /* Allow input to take up available space */
    margin-top: 0; /* Remove default button margin */
    min-width: 150px; /* Prevent input from becoming too small */
}

.email-input-group button {
    flex-shrink: 0; /* Prevent button from shrinking */
    margin-top: 0; /* Remove default button margin */
    width: auto; /* Allow button to size based on text */
    padding: 8px 15px; /* Adjust padding if needed */
}

.email-confirmation-section small {
     color: var(--primary-color); /* Match theme */
     font-weight: bold;
}
/* --- END ADDED --- */

/* --- ADDED: Responsive Styles for Email Input Group --- */
@media (max-width: 600px) { /* Adjust breakpoint as needed */
    .email-input-group {
        flex-direction: column; /* Stack items vertically */
        align-items: stretch; /* Make items take full width */
        gap: 10px; /* Adjust gap for vertical spacing */
    }

    .email-input-group label,
    .email-input-group input[type="email"],
    .email-input-group button {
        width: 100%; /* Make label, input, button full width */
        margin-top: 0; /* Ensure no extra top margin */
        min-width: auto; /* Reset min-width */
    }

    .email-input-group label {
         text-align: left; /* Ensure label text is left-aligned */
         margin-bottom: 5px; /* Add space below label */
    }
}
/* --- END ADDED --- */

/* Comment area styles */
.comment-area {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
}

.comment-area textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

/* Price list form styles */
.price-list-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 5px;
}

.price-list-form input {
    margin-bottom: 10px;
}

/* Product grid layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.product-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

/* Order summary styles */
.summary {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 5px;
}

.summary ul {
    list-style-position: inside;
    padding-left: 0;
    margin: 10px 0;
}

.summary li {
    padding: 5px 0;
}

/* Total price display */
.total-price {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    text-align: right;
}

/* Button groups */
.confirmation-buttons,
.admin-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirmation-buttons button,
.admin-buttons button {
    flex: 1;
}

.logout-button {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

/* Admin login button */
#adminLoginBtn {
    background-color: #6c757d;
    max-width: 200px;
    margin-left: auto;
    margin-right: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    position: relative;
    z-index: 1000;
}

#adminLoginBtn.show {
    display: block;
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-input {
        min-width: 100%;
    }
}

/* --- ADDED: Styles for Email Confirmation Section --- */
.email-confirmation-section {
    margin-top: 25px; /* Increased top margin */
    padding: 20px; /* Increased padding */
    /* background-color: var(--light-color); */ /* Use light theme color */
    background-color: #FFC300; /* Soft Yellow */
    border: 1px solid #ccc; /* Changed border to subtle grey */
    border-radius: 8px; /* Slightly larger radius */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.email-confirmation-section p {
    margin-bottom: 15px; /* Space below the paragraph */
}

.email-input-group {
    display: flex;
    /* align-items: center; */
    align-items: baseline; /* Align based on text baseline */
    gap: 10px;
}

.email-input-group label {
    flex-shrink: 0; /* Prevent label from shrinking */
    margin-bottom: 0; /* Remove default bottom margin */
}

.email-input-group input[type="email"] {
    flex-grow: 1; /* Allow input to take up available space */
    margin-top: 0; /* Remove default button margin */
    min-width: 150px; /* Prevent input from becoming too small */
}

.email-input-group button {
    flex-shrink: 0; /* Prevent button from shrinking */
    margin-top: 0; /* Remove default button margin */
    width: auto; /* Allow button to size based on text */
    padding: 8px 15px; /* Adjust padding if needed */
}

.email-confirmation-section small {
     color: var(--primary-color); /* Match theme */
     font-weight: bold;
}
/* --- END ADDED --- */ 