/* Guest Portal Custom Styles */

:root {
  --primary-color: #1a472a;
  --primary-dark: #0f2818;
  --secondary-color: #2c5530;
  --accent-color: #d4af37;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --success-color: #28a745;
  --light-bg: #f9fafb;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  min-height: 100vh;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
}

/* Booking Mode Toggle */
.booking-mode-toggle {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-btn {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  border: 3px solid #e5e7eb;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
  color: #6b7280;
}

.mode-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 71, 42, 0.2);
}

.mode-btn.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(26, 71, 42, 0.3);
}

.mode-btn i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.mode-btn div {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.mode-btn small {
  font-size: 0.85rem;
  font-weight: 400;
  color: #9ca3af;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 20px 0;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #9ca3af;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.step-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
}

.step.active .step-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(26, 71, 42, 0.4);
}

.step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

.step.completed .step-icon {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.step.completed .step-label {
  color: var(--secondary-color);
}

/* Cards */
.card {
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow);
}

.card-header {
  border-bottom: none;
}

/* Apartment Cards */
.apartment-card {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  height: 100%;
}

.apartment-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(26, 71, 42, 0.2);
}

.apartment-card.selected {
  border-color: var(--secondary-color);
  background: #e8f5e9;
}

.apartment-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.apartment-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--secondary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.price-tag {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-tag small {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 400;
}

/* Villa Cards */
.villa-card {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
}

.villa-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
}

.villa-card.selected {
  border-color: var(--secondary-color);
  background: #f0fdf4;
}

.villa-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 2;
}

.suite-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--warning-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
}

.suite-list {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px dashed #e5e7eb;
}

.suite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.suite-item:hover {
  background: #f3f4f6;
}

.suite-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.suite-details {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

.suite-price {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1rem;
}

.pricing-comparison {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid var(--warning-color);
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
}

.comparison-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comparison-label {
  font-weight: 600;
  color: #78350f;
}

.comparison-value {
  font-weight: 700;
  color: #92400e;
  font-size: 1.1rem;
}

.savings-badge {
  background: var(--secondary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 71, 42, 0.25);
}

.form-control-lg {
  padding: 12px 20px;
  font-size: 1.1rem;
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 71, 42, 0.3);
}

.btn-success {
  background: var(--success-color);
  border-color: var(--success-color);
}

.btn-success:hover {
  background: #218838;
  border-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* Loading Overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loadingOverlay .spinner-border {
  width: 4rem;
  height: 4rem;
}

/* Booking Summary */
.summary-item {
  padding: 15px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 15px;
}

.summary-item h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.summary-item p {
  margin-bottom: 5px;
  color: #4b5563;
}

/* Price Breakdown */
.price-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.price-item:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  padding-top: 15px;
  margin-top: 10px;
  border-top: 2px solid var(--primary-color);
}

/* Success Animation */
.success-icon i {
  animation: scaleIn 0.5s ease-in-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .progress-steps {
    flex-wrap: wrap;
  }

  .step {
    flex: 0 0 50%;
    margin-bottom: 20px;
  }

  .step-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .step-label {
    font-size: 0.8rem;
  }

  .price-tag {
    font-size: 1.4rem;
  }

  .apartment-image {
    height: 150px;
    font-size: 2rem;
  }
}

/* Navbar */
.navbar-brand {
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Booking Details View */
.booking-info-card {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.booking-info-card h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(26, 71, 42, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #4b5563;
}

.info-value {
  color: #1f2937;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-confirmed {
  background: #d1fae5;
  color: #065f46;
}

.status-paid {
  background: #dbeafe;
  color: #1e40af;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }

  .navbar,
  .btn,
  #loadingOverlay {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* ============================================
   FLATPICKR DATE PICKER CUSTOMIZATION
   ============================================ */

/* Override Flatpickr theme colors to match our design */
.flatpickr-calendar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: none;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.flatpickr-months {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 12px 12px 0 0;
  padding: 10px 0;
}

.flatpickr-current-month {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

.flatpickr-month {
  color: white;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  fill: white;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  fill: rgba(255, 255, 255, 0.8);
}

.flatpickr-weekday {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.flatpickr-day {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) {
  background: #e8f5e9;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.flatpickr-day.inRange {
  background: #e8f5e9;
  border-color: #a5d6a7;
  box-shadow: none;
}

.flatpickr-day.today {
  border-color: var(--secondary-color);
  font-weight: 600;
}

.flatpickr-day.today:hover {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

/* Input group styling for date pickers */
.input-group-text {
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary-color);
  background-color: #e8f5e9;
}

.input-group:focus-within .form-control {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 71, 42, 0.15);
}

/* Make date input more prominent */
#checkInDate,
#checkOutDate,
#newCheckOutDate {
  border: 2px solid #e5e7eb;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

#checkInDate:focus,
#checkOutDate:focus,
#newCheckOutDate:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 71, 42, 0.15);
}

/* Mobile responsiveness for Flatpickr */
@media (max-width: 768px) {
  .flatpickr-calendar {
    width: 100% !important;
    max-width: 340px;
  }

  .flatpickr-day {
    max-width: 40px;
    height: 40px;
    line-height: 40px;
  }

  .flatpickr-months {
    padding: 8px 0;
  }

  .flatpickr-current-month {
    font-size: 1rem;
  }
}
