/*
 * Custom Menu Builder Styles
 */

/* Main Container and Grid Layout for Step 1 */
.menu-builder-container {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


.weekly-selection, .meal-list {
    flex: 1; /* Distribute space evenly */
    padding: 10px;
}

.weekly-selection {
    border-right: 1px solid #eee;
}

/* Weekly Selection Slots */
.week-section {
    margin-bottom: 20px;
    border-left: 3px solid #ff9800;
    padding-left: 10px;
}

.meal-slots {
    min-height: 80px; /* Ensure space for empty slots */
/*     border: 1px dashed #ccc; */
/*     padding: 10px; */
/*     border-radius: 4px; */
}

.add-item-placeholder {
    padding: 16px;
    text-align: center;
    font-weight: 500;
    line-height: 20px;
    color: #1C1B1F;
}

.selected-meal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: #f9f9f9;
    border-radius: 4px;
}

.remove-meal-button {
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

/* Meal List (Right Side) */
.meal-list {
    position: relative;
}

.meal-items-scroll {
    max-height: 600px; /* Allow scrolling for many items */
    overflow-y: auto;
    padding-right: 30px;
}

.meal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.meal-info {
    flex-grow: 1;
}

.add-meal-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2em;
}

/* Form Details (Step 2) */
#personal-details-form {
    width: 100%;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
}

#personal-details-form label {
    grid-column: 1 / 3;
    font-weight: bold;
    margin-top: 10px;
}

#personal-details-form input[type="text"],
#personal-details-form input[type="tel"],
#personal-details-form input[type="email"],
#personal-details-form input[type="date"],
#personal-details-form select {
    grid-column: 1 / 3;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Two-column inputs */
#personal-details-form label[for="name"], 
#personal-details-form label[for="phone"],
#personal-details-form label[for="company_name"], 
#personal-details-form label[for="persons"] {
    grid-column: auto;
}

#personal-details-form input[name="name"], 
#personal-details-form input[name="phone"],
#personal-details-form input[name="company_name"], 
#personal-details-form select[name="persons"] {
    grid-column: auto;
}


/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.back-button {
    background: #ccc;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.next-button, .confirm-button {
    background: #DE7129;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.order-confirmation {
    width: 100%;
    padding: 30px;
    text-align: center;
    background: #e8f5e9;
    border: 2px solid #4CAF50;
    border-radius: 8px;
}


.add-to-week-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    width: 120px; /* give it some space */
}

.week-selector {
    padding: 5px;
    border-radius: 4px;
    width: 100%;
}

.add-meal-button {
    width: 100%;
    padding: 8px 10px !important;
    font-size: 1em !important;
}

.add-meal-button:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Add/Modify these styles in assets/css/menu-builder-style.css */

/* Weekly Selection Slots - Ensure structure is visible */

.menu-items-scroll {
    margin-top: 70px;
    overflow-y: scroll;
    height: 800px;
}

/* Custom scrollbar styles */
.menu-items-scroll::-webkit-scrollbar {
  width: 2px;
}

.menu-items-scroll::-webkit-scrollbar-thumb {
  background: #DE7129;
  border-radius: 10px;
}

.meal-slots {
    display: flex;
    flex-direction: column;
    gap: 28px;
/*     padding: 10px;
    border-radius: 4px; */
}

/* Base Slot Styling */
.meal-slot {
    padding: 40px 10px;
    border-radius: 4px;
    height: 40px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Styling for EMPTY slots */
.empty-slot {
    border: 1px dashed #ccc;
    color: #999;
    justify-content: start;
    gap: 35px;
    border-radius: 16px;
}

/* Styling for SELECTED slots (when item is added) */
.selected-meal-container {
    background: #e1f5fe; /* Light blue background for filled slot */
    border: 1px solid #03a9f4;
    font-weight: bold;
}

.selected-meal-container .remove-meal-button {
    /* Style for the 'x' button inside the filled slot */
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 1;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    flex-shrink: 0;
}

#meal-search {
    width: 220px;
    height: 50px;
    padding-left: 24px;
    border: 1px solid #E0E5F2;
}

.search-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    h3 {
        margin: 0;
    }
}

.meal-info {
    display: flex;
    align-content: flex-end;
    gap: 20px;
}

.dish-details {
    .dish-title {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
        line-height: 20px;
    }

    p {
        font-size: 14px !important;
        font-weight: 300 !important;
        line-height: 24px !important;
        color: #585858 !important;
    }
}

.meal-search-icon {
    margin-right: 8px;
    position: absolute;
    right: 20px;
}

.add-item-button {
    margin-left: 15px;
    width:49px;height:
    49px;border-radius:
    50%;border:1px solid #DE7129;
    background:transparent;
    color:#DE7129;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.cmb-accordion {
    border: 1px solid #e6e6e6;
    background: #ffffff;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cmb-accordion summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 600;
    color: #222;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0));
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

/* remove default triangle in some browsers */
.cmb-accordion summary::-webkit-details-marker { display: none; }
.cmb-accordion .accordion-title { display:flex; align-items:center; gap:10px; }
.cmb-accordion .accordion-indicator {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #DE7129; /* accent color used elsewhere */
    transition: transform .18s ease;
}
.cmb-accordion[open] .accordion-indicator {
    transform: rotate(45deg);
}
.cmb-accordion .accordion-panel {
    padding: 12px 14px 18px 14px;
    background: transparent;
}

#cmb-form-wrapper {
    padding-left: 0px;
    padding-right: 0px;
    margin: 0;
    width: 100%;
}


.form-grid input[type="text"],
.form-grid input[type="tel"],
.form-grid input[type="email"],
.form-grid input[type="date"]
{
    height: 50px !important;
    padding: 20px !important;
    border-radius: 30px !important;
    border: none !important;
    margin-top: 10px !important;
    box-shadow: 0px 0px 4px 4px #00000014 !important;
}


.form-grid input,select::placeholder {
    color: #757575 !important;
    font-weight: 400 !important;
}

.form-grid input:focus,
.form-grid select:focus,
#menu-type-select:focus {
    outline: #DE7129 1px !important;
    box-shadow: 0px 0px 6px 6px #DE712926 !important;
}

/* .form-grid select{
    height: 60px !important;
    padding: 20px !important;
    border-radius: 30px !important;
    border: none !important;
    margin-top: 10px !important;
    box-shadow: 0px 0px 4px 4px #00000014 !important;
    background: white !important;
      appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
} */

.form-grid select {
    background-color: #ffffff;
    padding: 20px ! important;
    border-radius: 30px ! important;
    margin-top: 5px !important;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23DE7129%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E);
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    box-shadow: 0px 0px 4px 4px #00000014 !important;
    color: #757575 !important;
}

#menu-selection-form {
    width: 100%;
}

.form-grid select::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #DE7129;
  font-size: 12px;
}

#menu-type-select {
        height: 50px !important;
    padding: 0px 20px 0px 20px !important;
    border-radius: 30px !important;
    border: none !important;
    margin-top: 10px !important;
    box-shadow: 0px 0px 4px 4px #00000014 !important;
    background: white !important;
      appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#menu-type-select::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #DE7129;
  font-size: 12px;
}



@media (max-width: 427px) {
	#personal-details-form input[type="text"],
	#personal-details-form input[type="tel"],
	#personal-details-form input[type="email"],
	#personal-details-form input[type="date"],
	#personal-details-form select[name="persons"] {
		grid-column: 1 / 3;
	}
}


@media (max-width: 786px) {
    .menu-builder-container,.section-container {
        flex-direction: column;
    }

    .search-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .meal-item, .meal-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .add-to-week-controls {
        width: 100%;
    }
}

.wp-message-box {
  display: none;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

/* Types */
.wp-message-box.info {
  display: block;
  background: #e7f3ff;
  color: #084298;
  border-left: 4px solid #0d6efd;
}

.wp-message-box.success {
  display: block;
  background: #e6f4ea;
  color: #0f5132;
  border-left: 4px solid #198754;
}

.wp-message-box.error {
  display: block;
  background: #f8d7da;
  color: #842029;
  border-left: 4px solid #dc3545;
}