/* ====================== MAIN CONTENT STYLES ====================== */
main {
flex: 1;
padding: 20px;
overflow-y: auto;
border-radius: 8px;
}

/* ====================== CHECKOUT FORM STYLES ====================== */
form {
display: flex;
flex-direction: column;
gap: 15px;
}

label {
margin: 0 0 5px;
font-weight: bold;
}

/* ★★★ START: NEW FLOATING LABEL STYLES ★★★ */
/* ===================================================
   FLOATING LABEL INPUT STYLES FOR CHECKOUT PAGE
   =================================================== */

/* ===================================================
   FINAL BEST - OUTLINED FLOATING LABEL
   =================================================== */

/* প্রতিটি ইনপুট ফিল্ডের ধারক */
.floating-label-container {
    position: relative;
    margin-bottom: 20px;
}

/* ইনপুট এবং টেক্সটএরিয়ার জন্য সাধারণ স্টাইল */
.floating-input {
    width: 100%;
    height: 58px;
    
    /* ★ নতুন ডিজাইন: আউটলাইন বর্ডার */
    border: 1px solid var(--divider-color);
    border-radius: 8px; /* ★ সব কোণা গোলাকার */
    
    background-color: transparent; /* ★ ব্যাকগ্রাউন্ড স্বচ্ছ থাকবে */
    
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    padding: 0 18px; /* ★ প্যাডিং অ্যাডজাস্ট করা হলো */
    outline: none;
    
    /* ★ নতুন ডিজাইন: আরও উন্নত ট্রানজিশন */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    caret-color: var(--primary-color);
    box-sizing: border-box;
}

/* Textarea-এর জন্য আলাদা উচ্চতা */
textarea.floating-input {
    height: auto;
    min-height: 120px;
    padding-top: 18px; /* ★ লেখার জন্য উপরে প্যাডিং */
    resize: vertical;
}

/* প্রতিটি ফিল্ডের লেবেল */
.floating-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: var(--text-lighter);
    pointer-events: none;
    
    /* ★ নতুন ডিজাইন: বর্ডারের উপর বসার জন্য লেবেলের ব্যাকগ্রাউন্ড */
    background: var(--background-light);
    padding: 0 8px; /* ★ লেখা ও বর্ডারের মধ্যে ফাঁকা জায়গা */

    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ★★★ ফ্লোটিং লেবেল অ্যানিমেশনের মূল জাদু (Notch Effect) ★★★ */
.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
    /* ★ লেবেলটি উপরে উঠে বর্ডারের উপর বসবে */
    top: 0;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: var(--primary-color);
}

/* ★★★ ফোকাস স্টেটের মূল আকর্ষণ (Glow Effect) ★★★ */
.floating-input:focus {
    /* ★ ফোকাস করলে বর্ডার মোটা ও রঙিন হবে */
    border: 2px solid var(--primary-color);
    
    /* ★ নতুন ডিজাইন: হালকা গ্লো শ্যাডো */
    box-shadow: 0 0 0 3px rgba(71, 255, 132, 0.12);
}










/* ===================================================
   STYLES FOR DATE & SELECT INPUTS (TO MATCH OUTLINED THEME)
   =================================================== */

/* ★ নতুন: Date এবং Select ফিল্ডের জন্য আউটলাইন স্টাইল */
#preferred-date,
#meal-time {
    display: block; /* ★ লেবেলের সাথে ঠিকভাবে বসার জন্য */
    width: 100%;
    height: 58px;
    
    border: 1px solid var(--divider-color);
    border-radius: 8px;
    
    background-color: var(--background-white);
    
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    padding: 0 18px;
    outline: none;
    
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* ★ ফোকাস করলে একইরকম গ্লো ইফেক্ট হবে */
#preferred-date:focus,
#meal-time:focus {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 255, 132, 0.12);
}

/* ★ Select (Meal Time) ফিল্ডের জন্য কাস্টম ড্রপডাউন অ্যারো */
#meal-time {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
}

/* ★ Date ফিল্ডের placeholder টেক্সটের রঙ ঠিক করা */
#preferred-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}
#preferred-date:in-range {
    color: var(--text-color);
}
#preferred-date:out-of-range {
    color: var(--text-lighter);
}

/* ====================== BUTTON STYLES ====================== */
button {
background-color: var(--primary-color);
color: var(--text-on-primary);
border: none;
padding: 12px 24px;
border-radius: 8px;
cursor: pointer;
font-size: 1em;
font-weight: bold;
transition: background-color 0.3s, transform 0.3s;
}

button:hover {
background-color: var(--primary-dark);
}

/* ====================== NOTIFICATION STYLES ====================== */
.notification {
display: none;
margin: 10px 0;
padding: 12px;
background-color: #f8d7da;
color: var(--error-red-dark);
border: 1px solid #f5c6cb;
border-radius: 8px;
font-size: 1em;
}


/* ====================== TYPOGRAPHY STYLES ====================== */
.enter-details {
  font-family: "Amarante", serif;
  font-size: 2em;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  margin: 30px 0;
  position: relative;
}

.enter-details::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.2); /* light underline (adjust color as needed) */
  position: absolute;
  bottom: -5px; /* moves it a bit lower */
  left: 0;
}

.section-title {
font-family: "Amarante", serif;
font-size: 2.5em;
color: var(--primary-color);
text-align: center;
white-space: nowrap;
margin: 20px 0;
}

/* ====================== LOCATION SHARING BUTTON ====================== */
#share-location {
background-color: var(--primary-dark);
color: var(--text-on-primary);
border: none;
padding: 12px 24px;
border-radius: 8px;
cursor: pointer;
font-size: 1em;
font-weight: bold;
transition: background-color 0.3s, transform 0.3s;
}

#share-location:hover {
background-color: var(--primary-color);
transform: scale(1.02);
}

/* ====================== DELIVERY DETAILS HEADING ====================== */
h3 {
  font-family: "Amarante", serif;
  font-size: 2em;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  margin: 20px 0;
  position: relative;
}

h3::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.2); /* Light underline */
  position: absolute;
  bottom: -5px; /* Space between text and underline */
  left: 0;
}

/* ====================== NOTIFICATION STYLES ====================== */
#notification {
display: none;
margin-top: 5px;
padding: 8px;
background-color: #f8d7da;
color: var(--error-red-dark);
border: 1px solid #f5c6cb;
border-radius: 4px;
font-size: 0.9em;
}

/* ====================== POPUP MODAL STYLES ====================== */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
background-color: var(--background-white);
margin: 10% auto;
padding: 20px;
border: 1px solid var(--text-lighter);
width: 80%;
max-width: 500px;
border-radius: 12px;
text-align: center;
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.modal-title {
color: var(--text-color);
font-size: 1.5em;
margin-bottom: 15px;
}

.close {
color: var(--text-lighter);
float: right;
font-size: 24px;
font-weight: bold;
}

.close:hover, .close:focus {
color: var(--text-color);
text-decoration: none;
cursor: pointer;
}

#popup-message {
color: var(--text-light);
font-size: 1.1em;
margin-bottom: 20px;
}

#ok-button {
background-color: var(--primary-dark);
color: var(--text-on-primary);
border: none;
padding: 12px 25px;
border-radius: 8px;
cursor: pointer;
font-size: 1em;
font-weight: bold;
transition: background-color 0.3s, transform 0.3s;
}

#ok-button:hover {
background-color: var(--primary-color);
transform: scale(1.02);
}

/* ====================== MEAL TIME DROPDOWN STYLES ====================== */
#meal-time {
padding: 12px;
border: 2px solid var(--primary-light);
border-radius: 8px;
font-size: 1em;
background-color: var(--background-white);
color: var(--primary-color);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
transition: border-color 0.3s, box-shadow 0.3s;
cursor: pointer;
}

#meal-time option {
background-color: var(--primary-extra-light);
color: var(--primary-dark);
padding: 12px;
font-family: 'Poppins', sans-serif;
font-size: 1em;
}

#meal-time option:hover {
background-color: var(--primary-color);
color: var(--text-on-primary);
}

#meal-time:focus {
border-color: var(--primary-dark);
outline: none;
box-shadow: 0 0 8px rgba(123, 31, 162, 0.5);
}

/* ====================== EXPANDABLE ORDER SUMMARY ====================== */
.order-summary {
margin-bottom: 20px;
border: 1px solid var(--text-lighter);
border-radius: 8px;
overflow: hidden;
background-color: var(--background-light);
}

.summary-header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--primary-extra-light);
padding: 16px 24px;
border-bottom: 1px solid var(--text-lighter);
}

.summary-button {
display: flex;
align-items: center;
background: none;
color: var(--primary-dark);
padding: 0;
border: none;
cursor: pointer;
font-size: 16px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
transition: transform 0.3s ease-in-out;
}


.summary-button:hover{
    background-color: var(--background-light);
}


.summary-button i {
margin-left: 8px;
font-size: 14px;
transition: transform 0.3s ease;
}

.summary-button.expanded i {
transform: rotate(180deg);
}

.final-price {
font-size: 18px;
font-weight: bold;
color: var(--text-color);
margin-left: auto;
padding-left: 16px;
}

.summary-content {
    max-height: 0;
    overflow: hidden; /* Collapsed state e hidden thakbe */
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, padding 0.5s ease-out;
    opacity: 0;
    background-color: var(--primary-extra-light);
}

.summary-content.expanded {
    max-height: 60vh; /* Use viewport height for better responsiveness */
    overflow-y: auto; /* Add vertical scrollbar when needed */
    opacity: 1;
    padding: 15px;
}

/* ====================== ALWAYS VISIBLE ORDER SUMMARY ====================== */
.always-visible-summary {
margin-top: 20px;
padding: 15px;
background-color: var(--primary-extra-light);
border: 1px solid var(--text-lighter);
border-radius: 5px;
}

.always-visible-summary h3 {
margin-top: 0;
color: var(--text-color);
font-size: 20px;
}


.order-item {
display: flex;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 2px dashed transparent;
position: relative;
}

.order-item::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: repeating-linear-gradient(
to right,
var(--text-color) 0%,
var(--text-color) 50%,
transparent 50%,
transparent 100%
);
background-size: 16px 2px;
animation: drawUnderline 1s linear infinite;
}

@keyframes drawUnderline {
0% {
background-position: 0 0;
}
100% {
background-position: 16px 0;
}
}

.order-item:last-child {
border-bottom: none;
}

.dish-image-container {
position: relative;
}

.dish-image {
width: 70px;
height: 70px;
border-radius: 5px;
margin-right: 10px;
}

.quantity-indicator {
position: absolute;
top: -5px;
right: 3px;
background-color: var(--text-light);
color: var(--text-on-primary);
font-size: 14px;
width: 20px;
height: 20px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.item-details {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
}

.item-details p {
margin: 0;
font-size: 14px;
}

.item-details .price {
font-weight: bold;
font-size: 16px;
color: var(--text-color);
margin-left: 10px;
}

/* ====================== SUBTOTAL STYLES ====================== */
#order-summary-subtotal,
#always-visible-subtotal {
position: relative;
font-weight: bold;
font-size: 18px;
margin-top: 20px;
padding-top: 10px;
}

#order-summary-subtotal::before,
#always-visible-subtotal::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 2px;
background: var(--primary-color);
}



/* ====================== ORDER TYPE SELECTION ====================== */
.order-type-selection {
display: flex;
gap: 12px;
margin-bottom: 24px;
justify-content: center;
}

.order-type-btn {
flex: 1;
padding: 14px 26px;
border: 2px solid var(--primary-dark);
border-radius: 10px;
background-color: var(--background-white);
color: var(--primary-dark);
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease-in-out;
text-align: center;
position: relative;
overflow: hidden;
}

.order-type-btn::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 300%;
height: 300%;
background-color: rgba(123, 31, 162, 0.1);
border-radius: 50%;
transform: translate(-50%, -50%) scale(0);
transition: transform 0.5s ease-in-out;
}

.order-type-btn:hover::before {
transform: translate(-50%, -50%) scale(1);
}

.order-type-btn.active, .order-type-btn:hover {
background-color: var(--primary-dark);
color: var(--text-on-primary);
box-shadow: 0 4px 8px rgba(123, 31, 162, 0.3);
}

/* ====================== DELIVERY DETAILS SECTION ====================== */
#delivery-details {
display: none;
margin-bottom: 24px;
padding: 18px;
background-color: var(--primary-extra-light);
border: 1px solid var(--text-lighter);
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#delivery-details.active {
display: block;
animation: fadeIn 0.3s ease-in-out;
}

#delivery-details label {
font-weight: bold;
color: var(--primary-dark);
margin-bottom: 8px;
display: block;
}

#delivery-details input[type="text"] {
width: 92%;
padding: 12px;
border: 2px solid var(--primary-dark);
border-radius: 8px;
font-size: 1em;
transition: border-color 0.3s, box-shadow 0.3s;
}

#delivery-details input[type="text"]:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 8px rgba(156, 39, 176, 0.5);
}

/* ====================== CUSTOM RADIO BUTTONS ====================== */
#delivery-details input[type="radio"] {
display: none;
}

#delivery-details input[type="radio"] + label {
display: inline-block;
padding: 10px 20px;
border: 2px solid var(--primary-dark);
border-radius: 8px;
background-color: var(--background-white);
color: var(--primary-dark);
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease-in-out;
text-align: center;
margin-right: 10px;
}

#delivery-details input[type="radio"]:checked + label {
background-color: var(--primary-dark);
color: var(--text-on-primary);
box-shadow: 0 4px 8px rgba(123, 31, 162, 0.3);
}

#delivery-details input[type="radio"] + label:hover {
background-color: rgba(123, 31, 162, 0.1);
color: var(--primary-dark);
}

/* ====================== PICKUP DETAILS SECTION ====================== */
#pickup-details {
display: none;
margin-bottom: 24px;
padding: 18px;
background-color: var(--primary-extra-light);
border: 1px solid var(--text-lighter);
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#pickup-details.active {
display: block;
animation: fadeIn 0.3s ease-in-out;
}

#pickup-details p {
margin: 12px 0;
font-size: 1em;
color: var(--text-color);
line-height: 1.5;
}

#pickup-details a {
color: var(--primary-dark);
text-decoration: none;
font-weight: bold;
transition: color 0.3s ease-in-out;
}

#pickup-details a:hover {
text-decoration: underline;
color: var(--primary-dark);
}

/* ====================== ANIMATIONS ====================== */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

/* ====================== AUTOFILL MODAL ====================== */
.popup-active {
overflow: hidden;
position: fixed;
width: 100%;
height: 100%;
}

.user-data-popup {
position: fixed;
inset: 0;
background: var(--overlay-bg);
backdrop-filter: blur(8px);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
touch-action: none;
}

/* ====================== POPUP CONTENT ====================== */
.popup-content {
background: rgba(255, 255, 255, 0.9);
border-radius: 16px;
padding: 30px;
width: 90%;
max-width: 420px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
border: 1px solid var(--divider-color);
backdrop-filter: blur(14px);
color: var(--text-color);
font-family: 'Poppins', sans-serif;
animation: fadeInUp 0.35s ease;
text-align: center;
max-height: 80vh;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}

.popup-content h3 {
margin-top: 0;
margin-bottom: 20px;
font-size: 20px;
font-weight: 600;
color: var(--text-color);
}

/* ====================== USER INFO BLOCK ====================== */
.user-info {
background: var(--primary-extra-light);
padding: 16px 20px;
border-radius: 12px;
margin: 20px 0;
text-align: left;
font-size: 15px;
color: var(--text-light);
box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.user-info p {
margin: 8px 0;
}

.user-info strong {
color: var(--primary-dark);
}

/* ====================== POPUP BUTTONS ====================== */
.popup-buttons {
display: flex;
justify-content: center;
gap: 12px;
}

.popup-buttons button {
flex: 1;
padding: 12px 18px;
border: none;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}

#use-saved-btn {
background: var(--primary-color);
color: var(--text-on-primary);
box-shadow: 0 4px 12px rgba(163, 200, 108, 0.4);
}

#use-saved-btn:hover {
background: var(--primary-dark);
}

#enter-manually-btn {
background: var(--error-red);
color: var(--text-on-primary);
box-shadow: 0 4px 12px rgba(183, 28, 28, 0.4);
}

#enter-manually-btn:hover {
background: var(--error-red-dark);
}

/* ====================== ANIMATIONS ====================== */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}