/* HalalBooking Plugin Styles */

/* General Styles */
.halalbooking-container,
.hb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Search Form Styles */
.hb-inline-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 8px;
  margin: 20px 0;
}

.hb-form-container {
  display: flex;
  align-items: center;
  gap: 1px;
  background: #f8f9fa;
  border-radius: 6px;
  overflow: hidden;
}

.hb-form-field {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  padding: 12px 16px;
  min-height: 60px;
  flex: 1;
  border-right: 1px solid #e9ecef;
}

.hb-form-field:last-of-type {
  border-right: none;
}

.hb-field-icon {
  color: #20b2aa;
  margin-right: 12px;
  flex-shrink: 0;
}

.hb-form-field input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
  width: 100% !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.hb-field-label {
  position: absolute;
  top: 8px;
  left: 48px;
  font-size: 12px;
  color: #20b2aa;
  font-weight: 500;
}

.hb-guests-trigger {
  border: none !important;
  background: transparent !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
  cursor: pointer;
  padding: 0 !important;
  text-align: left;
  width: 100%;
  box-shadow: none !important;
}

.hb-search-btn {
  background: #20b2aa !important;
  color: white !important;
  border: none !important;
  padding: 0 32px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
  height: 60px;
  border-radius: 0 6px 6px 0 !important;
  transition: background-color 0.2s;
}

.hb-search-btn:hover {
  background: #1a9a92 !important;
}

/* Autocomplete Suggestions */
.hb-autocomplete-container {
  position: relative;
  width: 100%;
}

.hb-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
}

/* Improved suggestion item styling with better hover and active states */
.hb-suggestion-item {
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}

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

.hb-suggestion-item:hover,
.hb-suggestion-item.active {
  background-color: #f0f9f8;
  padding-left: 20px;
}

.hb-suggestion-name {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 15px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.hb-suggestion-type {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
}

/* Custom scrollbar for suggestions dropdown */
.hb-suggestions-dropdown::-webkit-scrollbar {
  width: 6px;
}

.hb-suggestions-dropdown::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 0 8px 8px 0;
}

.hb-suggestions-dropdown::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

.hb-suggestions-dropdown::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* Modal Styles */
.hb-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hb-modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.hb-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.hb-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.hb-modal-body {
  padding: 20px;
}

.hb-modal-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  text-align: right;
}

/* Guest Counter */
.hb-group {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
}

.hb-group h4 {
  margin: 0 0 20px 0;
  color: #ff6b35;
  font-size: 16px;
}

.hb-counters-row {
  display: flex;
  gap: 40px;
  margin-bottom: 20px;
}

.hb-counter-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #333;
}

.hb-counter {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hb-counter-btn {
  width: 32px;
  height: 32px;
  border: 2px solid #20b2aa;
  background: white;
  color: #20b2aa;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hb-counter-btn:hover {
  background: #20b2aa;
  color: white;
}

.hb-counter-value {
  font-size: 18px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.hb-children-ages label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #333;
}

.hb-ages-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hb-age-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  min-width: 80px;
}

.hb-age-note {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hb-ok-btn {
  background: #20b2aa;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

/* Offer Cards */
.hb-offers-grid {
  display: grid;
  gap: 30px;
  margin-top: 20px;
}

.hb-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}
.hb-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}
.hb-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.hb-offer-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hb-offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hb-offer-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.hb-offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-offer-content {
  padding: 20px;
}

.hb-offer-title {
  font-size: 18px;
  margin: 0 0 10px 0;
  color: #333;
}

.hb-offer-title a {
  color: #333;
  text-decoration: none;
}

.hb-offer-title a:hover {
  color: #20b2aa;
}

.hb-rating {
  color: #ffa500;
  margin-bottom: 8px;
}

.hb-star {
  font-size: 16px;
}

.hb-offer-location {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.hb-offer-price {
  font-size: 24px;
  font-weight: bold;
  color: #20b2aa;
  margin-bottom: 16px;
}

.hb-price-info {
  font-size: 14px;
  color: #666;
  font-weight: normal;
}

/* Buttons */
.hb-btn-primary,
.btn-primary {
  display: inline-block;
  background: #20b2aa;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.hb-btn-primary:hover,
.btn-primary:hover {
  background: #1a9a92;
}

.hb-btn-secondary,
.btn-secondary {
  display: inline-block;
  background: #6c757d;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.hb-btn-secondary:hover,
.btn-secondary:hover {
  background: #5a6268;
}

/* Offer List */
.hb-offers-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hb-offer-list-item {
  display: grid;
  grid-template-columns: 300px 1fr auto;
  gap: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hb-offer-list-item .hb-offer-image {
  height: 200px;
}

.hb-offer-details {
  padding: 20px;
}

.hb-offer-booking {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  min-width: 200px;
}

/* Pagination */
.hb-pagination {
  margin: 30px 0;
  text-align: center;
}

.hb-pagination-list {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.hb-page-btn {
  padding: 8px 16px;
  background: #20b2aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.hb-page-btn:hover {
  background: #1a9a92;
}

.hb-page-current {
  padding: 8px 16px;
  color: #666;
}

/* Gallery Styles */
.hotel-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.gallery-main img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-count {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 8px 0 0 0;
}

/* Gallery Popup */
.gallery-popup {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.gallery-popup .popup-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-popup {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 2001;
}

.popup-swiper {
  width: 90%;
  height: 90%;
}

.popup-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Rooms Grid */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.room-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.room-card h4 {
  padding: 16px;
  margin: 0;
}

.room-card p {
  padding: 0 16px;
}

.room-card .price {
  font-size: 24px;
  font-weight: bold;
  color: #20b2aa;
  padding: 16px;
}

.room-card .btn {
  display: block;
  margin: 16px;
  text-align: center;
}

/* Booking Form */
.booking-form-section {
  max-width: 800px;
  margin: 0 auto;
}

.booking-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.terms-checkbox {
  flex-direction: row;
  align-items: center;
}

.terms-checkbox input {
  width: auto;
  margin-right: 8px;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 30px;
}

/* Messages */
.error-message,
.success-message {
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.reference-code {
  font-size: 24px;
  font-weight: bold;
  color: #20b2aa;
  padding: 16px;
  background: white;
  border-radius: 4px;
  text-align: center;
}

/* Improved form field styling for better autocomplete integration */
.hb-form-field {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  padding: 12px 16px;
  min-height: 60px;
  flex: 1;
  border-right: 1px solid #e9ecef;
}

.hb-form-field:last-of-type {
  border-right: none;
}

.hb-field-icon {
  color: #20b2aa;
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hb-form-field input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
  width: 100% !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Better focus state for input fields */
.hb-form-field input:focus {
  color: #1a1a1a !important;
}

.hb-form-field input::placeholder {
  color: #999 !important;
  font-weight: 400 !important;
}

.hb-field-label {
  position: absolute;
  top: 8px;
  left: 48px;
  font-size: 11px;
  color: #20b2aa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Loading state for autocomplete */
.hb-suggestions-dropdown.loading::before {
  content: "Searching...";
  display: block;
  padding: 14px 16px;
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Empty state for autocomplete */
.hb-suggestions-dropdown.empty::before {
  content: "No destinations found";
  display: block;
  padding: 14px 16px;
  color: #999;
  font-size: 14px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .hb-form-container {
    flex-direction: column;
  }

  .hb-form-field {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .hb-form-field:last-child {
    border-bottom: none;
  }

  .hb-search-btn {
    border-radius: 0 0 6px 6px 0 !important;
  }

  /* Better mobile positioning for autocomplete */
  .hb-suggestions-dropdown {
    max-height: 240px;
    font-size: 14px;
  }

  .hb-suggestion-item {
    padding: 12px 14px;
  }

  .hb-suggestion-item:hover,
  .hb-suggestion-item.active {
    padding-left: 18px;
  }

  .hb-counters-row {
    flex-direction: column;
    gap: 20px;
  }

  .hb-offers-grid {
    grid-template-columns: 1fr !important;
  }

  .hb-offer-list-item {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hotel-gallery {
    grid-template-columns: 1fr;
  }
}

/* =================================
   PAYMENT SECTION STYLES
   ================================= */

.hb-payment-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  border: 2px solid #20b2aa;
  box-shadow: 0 4px 20px rgba(32, 178, 170, 0.15);
}

.hb-payment-section h3 {
  color: #20b2aa;
  font-size: 22px;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hb-payment-info {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.hb-payment-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
}

.hb-payment-amount:last-child {
  border-bottom: none;
}

.hb-payment-amount label {
  font-size: 16px;
  color: #666;
}

.hb-payment-amount .amount {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.hb-payment-amount.total {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 15px -20px -20px;
}

.hb-payment-amount.total label {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.hb-payment-amount.total .amount {
  font-size: 28px;
  font-weight: 700;
  color: #20b2aa;
}

.hb-payment-deposit {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hb-payment-deposit p {
  margin: 0;
  color: #856404;
  font-size: 14px;
  line-height: 1.5;
}

.hb-payment-deposit strong {
  color: #664d03;
  font-size: 16px;
}

/* Payment Button */
.hb-payment-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #daba38 0%, #c9a82e 100%);
  color: white;
  border: none;
  padding: 18px 30px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(218, 186, 56, 0.4);
  letter-spacing: 1px;
  text-align: center;
}

.hb-payment-btn:hover {
  background: linear-gradient(135deg, #c9a82e 0%, #b89724 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 186, 56, 0.5);
}

.hb-payment-btn:active {
  transform: translateY(0);
}

.hb-payment-btn.secondary {
  background: linear-gradient(135deg, #20b2aa 0%, #1a9a92 100%);
  box-shadow: 0 4px 15px rgba(32, 178, 170, 0.4);
}

.hb-payment-btn.secondary:hover {
  background: linear-gradient(135deg, #1a9a92 0%, #168a82 100%);
  box-shadow: 0 6px 20px rgba(32, 178, 170, 0.5);
}

/* Booking Confirmation Enhanced */
.booking-confirmation {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.booking-confirmation .success-message {
  padding: 40px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.booking-confirmation h2 {
  color: #155724;
  font-size: 28px;
  margin: 0 0 15px 0;
}

.booking-reference {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin: 25px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.booking-reference h3 {
  color: #333;
  margin: 0 0 15px 0;
  font-size: 16px;
}

.booking-reference .reference-code {
  font-size: 32px;
  font-weight: 700;
  color: #20b2aa;
  letter-spacing: 3px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f9f8 0%, #e0f4f3 100%);
  border-radius: 8px;
  border: 2px dashed #20b2aa;
}

.booking-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.booking-details li {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
}

.booking-details li:last-child {
  border-bottom: none;
}

/* Payment Success/Pending Status */
.payment-pending {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

.payment-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #28a745;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

/* Improved Booking Summary */
.booking-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.booking-summary h3 {
  color: #20b2aa;
  font-size: 20px;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #20b2aa;
}

.summary-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.property-info h4 {
  color: #333;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.property-info .room-type {
  color: #666;
  font-size: 14px;
  margin: 0 0 15px 0;
  padding: 5px 10px;
  background: #e9ecef;
  border-radius: 4px;
  display: inline-block;
}

.price-summary {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.price-breakdown .total-price {
  background: #f8f9fa;
  margin: 15px -20px -20px;
  padding: 15px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 18px;
  color: #20b2aa;
}

/* Guest Details Form Improved */
.guest-details-form {
  background: white;
  border-radius: 12px;
  padding: 30px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.guest-details-form h3 {
  color: #333;
  font-size: 20px;
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.guest-details-form input:focus,
.guest-details-form textarea:focus,
.guest-details-form select:focus {
  border-color: #20b2aa;
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
  outline: none;
}

/* Agency Contact Info */
.hb-agency-contact {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
  border-top: 3px solid #20b2aa;
}

.hb-agency-contact h4 {
  color: #333;
  margin: 0 0 15px 0;
}

.hb-agency-contact p {
  color: #666;
  margin: 5px 0;
  font-size: 14px;
}

.hb-agency-contact a {
  color: #20b2aa;
  text-decoration: none;
}

/* Responsive Payment Styles */
@media (max-width: 768px) {
  .summary-details {
    grid-template-columns: 1fr;
  }

  .hb-payment-section {
    padding: 20px;
  }

  .hb-payment-amount.total .amount {
    font-size: 22px;
  }

  .hb-payment-btn {
    padding: 16px 20px;
    font-size: 16px;
  }

  .booking-reference .reference-code {
    font-size: 24px;
    letter-spacing: 2px;
  }
}
