/* Modern Booking Styles - Overrides and New Styles */

/* --- Layout & Container --- */
body {
  font-family: "Segoe UI", "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f0f2f5;
  color: #444;
  font-size: 14px;
  line-height: 1.6;
}

/* Override old #pms-wrap */
#pms-wrap {
  max-width: 1140px !important; /* Standard Bootstrap container */
  width: 100% !important;
  margin: 30px auto !important;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 30px;
  overflow: visible !important; /* Fix dropdowns being cut off */
  box-sizing: border-box;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Room Card Images */
.room-image-container {
  height: 200px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
}

/* Room Card Layout */
.pms-ratecode {
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #fff;
  transition: box-shadow 0.3s ease;
}

.pms-ratecode:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.room-details-col {
  padding-left: 20px;
  padding-right: 20px;
}

.room-price-col {
  border-left: 1px solid #f0f0f0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

@media (max-width: 991px) {
  .room-price-col {
    border-left: none;
    border-top: 1px solid #f0f0f0;
    padding-left: 15px;
    padding-top: 20px;
    margin-top: 20px;
  }
  .room-details-col {
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 15px;
  }
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 15px;
}

h1 {
  font-size: 28px;
}
h2 {
  font-size: 24px;
}

/* Utility Classes */
.display-flex {
  display: flex;
  flex-wrap: wrap;
}

/* Daily Rates Table */
.daily-rates-container {
  margin-top: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.daily-rates-header {
  padding: 15px 20px !important; /* Override inline styles */
  background: #fff !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #e9ecef !important;
  color: #2c3e50;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.daily-rates-header i {
  margin-right: 10px;
  color: #3498db;
}

.table-daily-rates {
  width: 100%;
  font-size: 13px;
  margin-bottom: 0;
  background: #fff;
}

.table-daily-rates td {
  padding: 15px 10px;
  text-align: center;
  border: none !important;
  vertical-align: middle;
}

.table-daily-rates strong {
  display: block;
  color: #34495e;
  margin-bottom: 5px;
  font-size: 14px;
}

/* --- Navigation Stepper (Replacing images) --- */
#mainNav {
  background: none !important;
  border-bottom: none !important;
  margin-bottom: 30px !important;
  overflow: hidden;
  border-radius: 4px;
  display: flex;
  padding: 0;
}

#mainNav li {
  float: left;
  width: 25% !important; /* Force percentage width over legacy fixed pixels */
  background: #e9ecef !important;
  background-image: none !important; /* Remove old GIFs */
  text-align: center;
  padding: 15px 5px;
  position: relative;
  margin: 0;
  list-style: none;
}

#mainNav li a {
  color: #6c757d !important;
  text-decoration: none;
  font-weight: 600;
  display: block;
  width: auto !important; /* Override legacy fixed width */
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#mainNav li em {
  font-style: normal;
  width: auto !important;
  display: inline-block !important;
  padding: 0 !important;
}

/* Active/Current Step */
#mainNav li.current {
  background: #3498db !important;
  background-image: none !important;
}

#mainNav li.current a {
  color: #fff !important;
}

/* Completed Steps */
#mainNav li.done,
#mainNav li.lastDone {
  background: #2ecc71 !important; /* Green for done */
  background-image: none !important;
}

#mainNav li.done a,
#mainNav li.lastDone a {
  color: #fff !important;
}

/* Arrow effect using CSS borders */
#mainNav li::after {
  content: "";
  position: absolute;
  top: 0;
  right: -15px;
  width: 0;
  height: 0;
  border-top: 26px solid transparent;
  border-bottom: 26px solid transparent;
  border-left: 15px solid #e9ecef;
  z-index: 2;
}

#mainNav li.current::after {
  border-left-color: #3498db;
}

#mainNav li.done::after,
#mainNav li.lastDone::after {
  border-left-color: #2ecc71;
}

#mainNav li:last-child::after {
  display: none;
}

/* Fix for the first item having a flat left edge */
#mainNav li:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

#mainNav li:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* --- Navigation Wizard --- */
#mainNav {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  display: flex;
  width: 100%;
  border-radius: 50px;
  background-color: #e9ecef;
  overflow: hidden;
}

#mainNav li {
  flex: 1;
  text-align: center;
  position: relative;
}

#mainNav li a {
  display: block;
  padding: 15px 10px;
  color: #6c757d;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
}

#mainNav li em {
  font-style: normal;
}

/* Active Step */
#mainNav li.current {
  background-color: #3498db;
}

#mainNav li.current a {
  color: #fff;
}

/* Completed Steps */
#mainNav li.done,
#mainNav li.lastDone {
  background-color: #d1ecf1;
}

#mainNav li.done a,
#mainNav li.lastDone a {
  color: #0c5460;
}

/* Arrow effect (optional, simple version here) */
#mainNav li:not(:last-child) {
  border-right: 1px solid #fff;
}

/* --- Header & Heading --- */
#pms-heading h1 {
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 5px;
}

#pms-heading address {
  font-style: normal;
  color: #7f8c8d;
  font-size: 14px;
}

/* Converter Box */
#pms-convertor {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.pms-head-color {
  margin-bottom: 10px;
  color: #2c3e50;
}

#pms-convertor select {
  height: 35px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #ced4da;
  width: 100%;
  background-color: #fff;
}

/* --- Forms & Inputs --- */
/* Form Controls */
.form-control {
  height: 45px;
  padding: 10px 15px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  box-shadow: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

textarea.form-control {
  height: auto;
}

.input-group-addon {
  background-color: #f8f9fa;
  border-color: #ced4da;
}

/* --- Buttons --- */
.btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.btn-lg {
  padding: 12px 30px;
  font-size: 16px;
}

.btn-success {
  background-color: #27ae60;
  border-color: #27ae60;
}

.btn-success:hover {
  background-color: #219150;
  border-color: #219150;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-book-now {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  border: none;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px; /* Reduced font size to fit better */
  padding: 12px 10px; /* Reduced padding */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 50px; /* Pill shape */
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
  text-decoration: none !important;
  display: block;
  width: 100%;
  text-align: center;
  line-height: normal; /* Ensure vertical alignment */
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-book-now:hover,
.btn-book-now:focus {
  background: linear-gradient(135deg, #27ae60 0%, #219150 100%);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.6);
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* --- Cards & Panels --- */
.pms-ratecode {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.pms-ratecode:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #dee2e6;
  transform: translateY(-2px);
}

/* Enhanced Card Style */
.pms-ratecode {
  border: none; /* Remove default border */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); /* Softer, deeper shadow */
  border-radius: 12px; /* More rounded corners */
  overflow: hidden; /* Keep content inside rounded corners */
  margin-bottom: 30px; /* More space between cards */
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pms-ratecode:hover {
  transform: translateY(-5px); /* Lift effect */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* --- Sidebar --- */
#pms-sidebar {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.pms-head-color {
  background-color: #34495e !important;
  color: #fff !important;
  padding: 15px;
  border-radius: 4px 4px 0 0;
  margin: -20px -20px 20px -20px;
  border-bottom: none !important;
}

/* --- Booking Summary --- */
.booking-summary {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* --- Footer --- */
#bottomright {
  z-index: 9999;
}

/* --- Responsive Fixes --- */
@media (max-width: 768px) {
  #mainNav li {
    width: 100%;
    float: none;
    margin-bottom: 2px;
  }
  #mainNav li::after {
    display: none;
  }

  #pms-wrap {
    padding: 15px;
    margin: 10px;
    width: auto !important;
  }
}

/* --- Fancybox Overrides --- */
.fancybox-nav span {
  visibility: visible !important; /* Always show arrows */
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.fancybox-nav:hover span {
  opacity: 1;
}

.fancybox-prev span {
  left: 10px;
}

.fancybox-next span {
  right: 10px;
}

/* Ensure close button is visible */
.fancybox-close {
  top: -18px;
  right: -18px;
  background-image: url("../admin/packages/global/plugins/fancybox/source/fancybox_sprite.png"); /* Ensure path is correct if needed, though relative usually works */
}

/* Fix for mobile width */
@media (max-width: 768px) {
  .fancybox-nav {
    width: 60px; /* Reduce clickable area on mobile to avoid accidental clicks */
  }

  .fancybox-nav span {
    opacity: 1; /* Full opacity on mobile */
  }
}

/* --- Amenities Icons --- */
.amenity-grid {
  display: flex;
  flex-wrap: wrap;
  padding-top: 15px;
  margin-left: -5px;
  margin-right: -5px;
}

.amenity-item {
  width: 20%; /* 5 items per row on desktop */
  padding: 5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 14px; /* Increased from 13px */
  color: #333;
}

.amenity-icon-wrapper {
  width: 40px; /* Increased from 32px */
  height: 40px; /* Increased from 32px */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #27ae60; /* Consistent green */
  background-color: #e8f5e9; /* Light green background */
  border-radius: 50%; /* Circular */
  flex-shrink: 0;
}

.amenity-icon-wrapper i {
  font-size: 18px; /* Explicit larger size */
}

.amenity-label {
  line-height: 1.2;
}

@media (max-width: 768px) {
  .amenity-item {
    width: 33.33%; /* 3 items per row on tablet */
  }
}

@media (max-width: 480px) {
  .amenity-item {
    width: 50%; /* 2 items per row on mobile */
  }
}

/* --- Booking Detail Page Styles --- */

/* Sidebar Cart View */
#pms-frmcartview {
  background: #fff;
  border: none;
  border-radius: 8px;
  overflow: hidden;
}

#pms-frmcartview table {
  width: 100%;
  margin-bottom: 0;
}

#pms-frmcartview td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  color: #555;
}

#pms-frmcartview td strong {
  color: #333;
  font-weight: 600;
}

/* Sidebar Header */
.pms-th-color {
  background-color: #f8f9fa !important;
  color: #333 !important;
  padding: 15px !important;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 2px solid #e9ecef !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content Sections */
#pms-personalinfo,
#pms-paymentinfo,
#pms-additionaldetail,
#pms-bookingpolicy,
#pms-extra {
  background: #fff;
  border: 1px solid #e9ecef !important; /* Override inline borders */
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* Section Headers */
#pms-personalinfo h2,
#pms-paymentinfo h2,
#pms-additionaldetail h2,
#pms-bookingpolicy h2,
#pms-extra h2 {
  font-size: 18px;
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 700;
}

/* Form Labels */
.form-group label {
  font-weight: 600;
  color: #555;
  font-size: 13px;
  margin-bottom: 8px;
}

/* Payment Options */
#pms-paymentinfo label.inline {
  display: block;
  float: none;
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

#pms-paymentinfo label.inline:hover {
  background-color: #f8f9fa;
  border-color: #3498db;
}

#pms-paymentinfo input[type="radio"] {
  margin-right: 10px;
}

/* Policy Section */
.policy-scroll-box {
  display: block;
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: scroll;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

/* Confirm Button Container */
.form-group.text-center {
  margin-top: 40px !important;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

/* Responsive fixes for sidebar cart on very small screens */
@media (max-width: 575px) {
  /* Allow cells that were marked nowrap to wrap on narrow viewports */
  #pms-frmcartview td,
  #pms-frmcartview th {
    white-space: normal !important;
    word-break: break-word;
    padding: 10px 12px;
  }

  /* Prevent fixed-width layout from forcing overflow */
  #pms-frmcartview table {
    table-layout: auto;
    width: 100%;
  }

  /* Reduce inner padding so the content fits the card */
  #pms-frmcartview {
    padding: 6px;
  }

  /* Ensure amenities wrap to multiple rows without expanding the container */
  #pms-frmcartview div[style*="display: flex"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Ensure the cart frame matches its content and avoid legacy double borders */
#pms-frmcartview.pms-border {
  border: 1px solid #e9ecef !important;
  padding: 12px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  background: #fff !important;
}

#pms-frmcartview.pms-border table {
  width: 100%;
  table-layout: auto;
}

#pms-frmcartview.pms-border td {
  white-space: normal;
  word-break: break-word;
}

.pms-border-inner {
  display: block;
  box-sizing: border-box;
  padding: 10px;
  border: 2px solid rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  background: #fff;
}

/* Amenities in Sidebar */
#pms-frmcartview .fa {
  width: 20px;
  text-align: center;
}

/* --- Footer --- */

/* Payment Descriptions */
.payment_type_desc {
  display: none;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #555;
}

.payment_type_desc p {
  margin-bottom: 0;
}

/* Ensure clearfix works if not using Bootstrap's */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}
