/* Apartment Booking System - Frontend Styles */

/* Apartment Wrapper */
.abs-apartment-wrapper {
  width: 100%;
  padding: 120px 0px 50px 0px;
}

/* Apartment Single */
.abs-apartment-single {
  background: #fff;
}

/* Gallery Styles */
.abs-gallery {
  margin-bottom: 30px;
}

.abs-gallery-main {
  width: 100%;
  margin-bottom: 15px;
}

.abs-filter-row {
  display: flex;
  gap: 20px;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

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

.abs-gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.abs-gallery-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s;
}

.abs-gallery-thumb:hover {
  transform: scale(1.05);
}

/* Content Layout */
.abs-apartment-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .abs-apartment-content {
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
  }
}

/* Apartment Title */
.abs-apartment-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #2c3e50;
}

/* Apartment Meta */
.abs-apartment-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.abs-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-size: 16px;
}

/* Location */
.abs-location {
  margin-bottom: 30px;
}

.abs-location h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.abs-location address {
  font-style: normal;
  line-height: 1.6;
  color: #666;
}

/* Description */
.abs-apartment-description {
  margin-bottom: 30px;
}

.abs-apartment-description h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.abs-apartment-description p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
}

/* Features */
.abs-features {
  margin-bottom: 30px;
}

.abs-features h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.abs-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.abs-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: #555;
}

/* Booking Form */
.abs-booking-form-wrapper {
  position: sticky;
  top: 20px;
}

.abs-booking-form {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.abs-booking-form h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.abs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.abs-form-group {
  margin-bottom: 20px;
}

.abs-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.abs-form-group input[type="date"],
.abs-form-group input[type="text"],
.abs-form-group input[type="email"],
.abs-form-group input[type="tel"],
.abs-form-group select,
.abs-form-group textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  transition: border-color 0.3s;
}

.abs-form-group input:focus,
.abs-form-group select:focus,
.abs-form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.abs-time-info {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 13px;
}

/* Buttons */
.abs-button {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.abs-button-primary {
  background-color: #3498db;
  color: #fff;
}

.abs-button-primary:hover {
  background-color: #2980b9;
}

.abs-button-large {
  width: 100%;
  padding: 15px;
  font-size: 18px;
}

.abs-availability-result {
  margin-top: 15px;
  padding: 12px;
  border-radius: 4px;
  display: none;
}

.abs-availability-result.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.abs-availability-result.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

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

.abs-modal.active {
  display: block;
}

.abs-modal-content {
  background-color: #fff;
  margin: 50px auto;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  position: relative;
  animation: slideDown 0.3s;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.abs-modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.abs-modal-close:hover {
  color: #000;
}

.abs-booking-summary {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 25px;
}

.abs-booking-summary h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #2c3e50;
}

.abs-booking-summary p {
  margin: 8px 0;
  color: #555;
}

/* Loading State */
.abs-loading {
  opacity: 0.6;
  pointer-events: none;
}

.abs-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Icons (using simple CSS shapes) */
.abs-icon-bed::before,
.abs-icon-bath::before,
.abs-icon-users::before,
.abs-icon-check::before {
  content: "●";
  margin-right: 5px;
  color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
  .abs-form-row {
    grid-template-columns: 1fr;
  }

  .abs-gallery-main img {
    height: 300px;
  }

  .abs-apartment-title {
    font-size: 24px;
  }

  .abs-modal-content {
    margin: 20px;
    padding: 20px;
  }

  .abs-compact-form-row {
    grid-template-columns: 1fr !important;
  }

  .abs-compact-form-field {
    margin-bottom: 15px;
  }
}

/* Compact Booking Form (for shortcode) */
.abs-compact-booking-wrapper {
  width: 100%;
  margin: 20px 0;
}

.abs-compact-booking-form {
  background: #ffffff;
  padding: 0;
  border-radius: 4px;
}

.abs-compact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}

.abs-compact-form-field {
  display: flex;
  flex-direction: column;
}

.abs-compact-form-field label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.abs-compact-form-field input[type="date"],
.abs-compact-form-field select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
  transition: all 0.3s;
  height: 48px;
}

.abs-compact-form-field input[type="date"]:focus,
.abs-compact-form-field select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.abs-compact-form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.abs-field-helper {
  display: block;
  margin-top: 5px;
  color: #999;
  font-size: 12px;
}

.abs-compact-submit-field {
  align-self: end;
}

.abs-compact-button {
  width: 100%;
  padding: 14px 30px;
  background: #f4c68c;
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 48px;
  white-space: nowrap;
}

.abs-compact-button:hover {
  background: #e5b573;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 198, 140, 0.4);
}

.abs-compact-button:active {
  transform: translateY(0);
}

/* Compact form loading state */
.abs-compact-booking-form.abs-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Date input styling */
.abs-compact-form-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.abs-compact-form-field
  input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Select dropdown styling */
.abs-compact-form-field select option {
  padding: 10px;
}

/* Responsive compact form */
@media (max-width: 1024px) {
  .abs-compact-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .abs-compact-submit-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .abs-compact-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .abs-compact-button {
    padding: 15px 20px;
  }
}

/* =====================================================
   AVAILABILITY CALENDAR STYLES
   ===================================================== */

.abs-availability-calendar-wrapper {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin: 30px 0;
}

/* Calendar Header */
.abs-availability-header {
  margin-bottom: 25px;
}

.abs-availability-header h3 {
  font-size: 20px;
  color: #2c3e50;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.abs-calendar-icon {
  color: #7cb342;
  font-size: 24px;
}

/* Legend */
.abs-availability-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 15px 0;
  border-top: 1px solid #e0e0e0;
}

.abs-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.abs-legend-box {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.abs-legend-box.abs-available {
  background-color: #7cb342;
}

.abs-legend-box.abs-past {
  background-color: #e0e0e0;
}

.abs-legend-box.abs-booked {
  background-color: #c8e6c9;
}

.abs-legend-box.abs-today {
  background-color: #37474f;
}

/* Calendar Navigation */
.abs-calendar-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.abs-nav-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 24px;
  color: #555;
}

.abs-nav-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.abs-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.abs-nav-arrow {
  line-height: 1;
}

/* Calendar Container */
.abs-calendar-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Month Box */
.abs-calendar-month {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.abs-month-header {
  background: #37474f;
  color: #fff;
  text-align: center;
  padding: 15px;
  font-weight: 600;
  font-size: 16px;
}

.abs-calendar-grid {
  padding: 10px;
}

/* Weekday Headers */
.abs-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

.abs-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 8px 0;
}

/* Calendar Dates */
.abs-dates-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.abs-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: all 0.2s;
}

.abs-calendar-day.abs-empty {
  background: transparent;
}

.abs-calendar-day.abs-available {
  background-color: #7cb342;
  color: #fff;
  cursor: pointer;
}

.abs-calendar-day.abs-available:hover {
  background-color: #689f38;
  transform: scale(1.05);
}

.abs-calendar-day.abs-past {
  background-color: #e0e0e0;
  color: #999;
}

.abs-calendar-day.abs-booked {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.abs-calendar-day.abs-today {
  background-color: #37474f;
  color: #fff;
  font-weight: 700;
}

.abs-calendar-day.abs-today.abs-booked {
  background-color: #37474f;
  color: #fff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .abs-calendar-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .abs-availability-calendar-wrapper {
    padding: 15px;
  }

  .abs-availability-legend {
    gap: 10px;
  }

  .abs-legend-item {
    font-size: 12px;
  }

  .abs-legend-box {
    width: 24px;
    height: 24px;
  }

  .abs-calendar-day {
    font-size: 12px;
  }

  .abs-weekday {
    font-size: 11px;
  }

  .abs-month-header {
    font-size: 14px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .abs-calendar-container {
    gap: 15px;
  }

  .abs-calendar-grid {
    padding: 5px;
  }

  .abs-weekday-row,
  .abs-dates-grid {
    gap: 1px;
  }

  .abs-calendar-day {
    font-size: 11px;
  }

  .abs-weekday {
    font-size: 10px;
    padding: 5px 0;
  }
}

/* Loading State */
.abs-calendar-container.abs-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
  min-height: 400px;
}

.abs-calendar-container.abs-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: abs-spin 1s linear infinite;
}

/* Responsive Search Form */
/* Responsive Search Form */
@media (max-width: 991px) {
  .abs-filter-row {
    flex-wrap: wrap;
  }

  .abs-filter-field {
    flex: 1 1 45%;
  }

  .abs-filter-submit {
    flex: 1 1 100%;
    margin-top: 10px;
  }

  .abs-filter-button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .abs-filter-form-wrapper {
    padding: 15px;
    display: flex;
    flex-direction: column;
  }

  .abs-filter-form {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .abs-filter-row {
    flex-direction: column;
    gap: 15px;
  }

  .abs-filter-field {
    width: 100%;
    flex: 1 1 100%;
    margin-bottom: 0;
  }

  .abs-filter-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
  }
}
