/* Base Styles */
.multi-select {
    position: relative;
    width: 100%; /* Full width by default */
    max-width: 800px; /* Maximum width for larger screens */
}

.multi-select input {
    width: 100%; /* Always full width of parent */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px; /* Better mobile touch target */
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    display: none;
    width: 100%; /* Match input width */
}

.dropdown div {
    padding: 10px;
    cursor: pointer;
    font-size: 15px; /* Slightly larger for mobile */
}

.dropdown div:hover {
    background-color: #f0f0f0;
}



/* Tags Container - Responsive */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%; /* Prevent container overflow */
  overflow: hidden; /* Hide any potential overflow */
}

/* Individual Tag Styling */
.tag {
  /* Layout */
  display: inline-flex;
  align-items: center;
  flex-shrink: 0; /* Prevent tags from shrinking */
  
  /* Visual Style */
  color: white;
  background-color: #3b82f6; /* Default blue, change as needed */
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  
  /* Text Handling */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

/* Tag Close Button */
.tag span {
  margin-left: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  line-height: 0.8;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tag span:hover {
  opacity: 1;
}

/* Mobile-Specific Adjustments */
@media (max-width: 767px) {
  .tags {
    gap: 6px;
    margin-top: 10px;
  }
  
  .tag {
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 14px;
    max-width: calc(100% - 12px); /* Account for gap */
  }
  
  .tag span {
    margin-left: 4px;
    font-size: 14px;
  }
}

/* Very Small Screens (e.g. < 375px) */
@media (max-width: 374px) {
  .tag {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* Prevent Horizontal Scrolling Globally */
body {
  overflow-x: hidden;
  width: 100%;
}




/* Mobile Optimizations */
@media (max-width: 768px) {
    .multi-select {
        padding: 0 10px; /* Add some side padding */
    }
    
    .multi-select input {
        padding: 12px; /* Larger touch target */
    }
    
    .dropdown {
        max-height: 50vh; /* Use viewport height */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .dropdown div {
        padding: 12px 10px; /* Larger touch targets */
    }
    
    .tag {
        padding: 6px 12px; /* Slightly larger */
        word-break: break-word; /* Handle long text */
    }
}

/* Very small screens adjustments */
@media (max-width: 480px) {
    .multi-select input {
        font-size: 14px; /* Slightly smaller font */
    }
    
    .dropdown div {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .tag {
        font-size: 13px;
        padding: 5px 8px;
    }
}     


.shop-header {
    font-weight: bold;
    margin-top: 10px;
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

.dropdown-item {
    padding: 5px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}


.tag .remove-tag {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    color: white;
}

.tag-shop {
    font-size: 12px;
    margin-left: 5px;
    font-style: italic;
}


#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Global button styles */
submit-button {
    padding: 12px 20px;
    background-color: #007BFF; /* Primary Blue */
    color: white;
    border: none;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
    width: auto; /* Ensures the button width adapts to its content */
}

button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect on hover */
}

button:focus {
    outline: none; /* Removes the default focus outline */
    box-shadow: 0 0 0 3px rgba(38, 143, 255, 0.6); /* Subtle focus ring */
}

button:disabled {
    background-color: #d6d6d6; /* Light gray when disabled */
    cursor: not-allowed; /* Disabled cursor */
}

button:active {
    background-color: #004085; /* Even darker blue when clicked */
    transform: translateY(0); /* Reset lift effect */
}


   /* Styles for the overlay */
        #popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }

        /* Styles for the popup box */
        #popup-box {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            z-index: 1001;
            width: 500px;
        }

        #popup-box h2 {
            margin-top: 0;
        }

        #popup-box form {
            display: flex;
            flex-direction: column;
        }

        #popup-box input[type="email"] {
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        #popup-box button {
            padding: 10px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        #popup-box button:hover {
            background-color: #0056b3;
        }

      
        
        
   

    /* Close button */
    #close-popup {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 16px;
        color: #666;
        cursor: pointer;
        background: none;
        border: none;
        font-weight: bold;
    }

    #close-popup:hover {
        color: #333;
    }

    /* Form */
    #email-form {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #email-form label {
        font-size: 14px;
        color: #555;
        text-align: left;
    }

   /* Target only the email input specifically */
#email-form input[type="email"] {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}

/* Target only the OTP inputs */
.otp-input {
    width: 50px;
    height: 50px;
    font-size: 20px;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}


    #email-form button {
        padding: 10px;
        font-size: 16px;
        border: none;
        border-radius: 5px;
        background-color: #4CAF50;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #email-form button:hover {
        background-color: #45a049;
    }
    
    
    #email-form button {
        padding: 10px;
        font-size: 16px;
        border: none;
        border-radius: 5px;
        background-color: #4CAF50;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #email-form button:hover {
        background-color: #45a049;
    }

    /* Receipt container */
    .receipt-container {
        margin-top: 20px;
        border: 1px solid #ddd;
        border-radius: 10px;
        background-color: #f9f9f9;
        padding: 15px;
        text-align: left;
        font-family: 'Arial', sans-serif;
        max-height: 300px; /* Set a maximum height */
        overflow-y: auto; /* Enable vertical scrolling */
    }

    .receipt-header {
        text-align: center;
        margin-bottom: 10px;
    }

    .receipt-header h1 {
        margin: 0;
        font-size: 20px;
        color: #333;
    }

    .receipt-header p {
        margin: 0;
        font-size: 14px;
        color: #777;
    }

    .receipt-details {
        margin-top: 10px;
    }

    .details-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        font-size: 14px;
        color: #555;
    }

    .details-item .highlight {
        font-weight: bold;
        color: #333;
    }

    .receipt-total {
        font-size: 16px;
        font-weight: bold;
        margin-top: 15px;
        text-align: center;
        color: #333;
    }

    .receipt-footer {
        text-align: center;
        margin-top: 15px;
        font-size: 14px;
        color: #777;
    }
    
    
     
    
    
    