/* assets/css/availability-visits.css */

/* Main Section */
.availability-section {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  margin-top: 2rem;
  padding: 1rem;
  scroll-margin-top: 6rem;
}

@media (max-width: 768px) {
  .availability-section {
    margin-top: 2rem;
    padding: 0.5rem;
  }
}

/* Section Header */
.line-text-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.line-text-container hr {
  flex: 1;
  border: none;
  border-top: 2px solid;
  opacity: 0.8;
}

.line-text-container h2 {
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
  text-align: center;
}

/* Table Header with Chevrons */
.table-header {
  color: white;
  border-radius: 0.5rem 0.5rem 0 0;
  text-align: center;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  user-select: none;
}

.table-header span {
  font-weight: 400;
  font-size: 1.125rem;
}

.table-header i {
  width: 20px;
  height: 20px;
}

/* Table Container */
.table-container {
  overflow-x: auto;
  border-radius: 0 0 1rem 1rem;
  border: 1px solid;
}

/* Table Styles */
.availability-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 1rem;
}

.availability-table thead th {
  width: 50%;
  border: 1px solid #b7c6bc;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: center;
}

.availability-table tbody tr {
  border-bottom: 1px solid #b7c6bc;
}

.availability-table tbody tr:last-child {
  border-bottom: none;
}

.availability-table tbody td {
  padding: 0.5rem 1rem;
  text-align: center;
}

.availability-table tbody td.floor-cell {
  background-color: #f6f8fa;
  border-right: 1px solid #b7c6bc;
}

.availability-table tbody td.units-cell {
  background-color: #f6f8fa;
}

.floor-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.floor-content.locked {
  cursor: pointer;
}

.floor-content.locked:hover {
  opacity: 0.8;
}

.units-cell.locked {
  font-style: italic;
  color: #6b7280;
  cursor: pointer;
}

.units-cell.locked:hover {
  opacity: 0.8;
}

/* Brochure Form Section */
.brochure-form-section {
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  gap: 1rem;
  width: 100%;
}

.brochure-form-section h2 {
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: center;
  width: 100%;
}

.brochure-form {
  display: flex;
  width: 100%;
  max-width: 28rem;
}

.form-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-row {
  display: flex;
  width: 100%;
  position: relative;
}

/* Country Code Select */
.country-select {
  appearance: none;
  border-radius: 0.5rem 0 0 0.5rem;
  /* padding: 0.5rem; */
  font-weight: 600;
  border: 2px solid;
  font-size: 0.9375rem;
  outline: none;
  cursor: pointer;
  color: white;
  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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.5rem !important;
}

/* Force white text and white arrow ONLY in Amenities brochure form */
.availability-section .country-select {
  color: white !important;
  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='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-color: transparent !important;
}

.availability-section .country-select option {
  color: #1a1a1a; /* Dark text when dropdown opens */
  background: white;
}

/* Phone Input Container */
.input-container {
  position: relative;
  flex-grow: 1;
}

.phone-input {
  appearance: none;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  color: white;
  border-top: 2px solid;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  outline: none;
  background-color: transparent;
}

.phone-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="tel"]::-webkit-inner-spin-button,
input[type="tel"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"],
input[type="tel"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Submit Buttons */
.submit-btn {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
  border: none;
  white-space: nowrap;
}

.submit-btn:hover {
  opacity: 0.9;
}

.submit-btn i {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.desktop-btn {
  display: none;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.mobile-btn {
  margin-top: 0.75rem;
  justify-content: center;
  width: 100%;
}

/* ===== GRAPHS SECTION ===== */

.graphs-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .graphs-container {
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* Graph Card */
/* Graph Card - Important: make it the positioning context */
.graph-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 2px solid;
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: visible; /* CHANGED: was hidden → now visible to prevent clipping */
  position: relative; /* ADD THIS: badge will be positioned relative to this */
}

/* Graph Content - reduce top padding since badge now sits outside */
.graph-content {
  position: relative;
  padding: 1.5rem 1rem 1rem 1rem; /* Keep original top padding, but badge is now outside */
  flex: 1;
}

/* Graph Badge - Perfect positioning to match original design */
.graph-badge {
  position: absolute;
  top: 0; /* Align to the very top of .graph-card */
  left: 50%;
  transform: translateX(-50%) translateY(-50%); /* Pull up exactly half its height */
  background-color: inherit; /* Inherits theme primary color */
  border: 2px solid inherit;
  border-radius: 9999px; /* Pill shape - matches original rounded look */
  padding: 0.5rem 1.5rem; /* Slightly more vertical padding for better proportions */
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.05em;
  z-index: 20; /* Ensure it's above everything */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: subtle shadow for depth */
}

/* Graph Header */
.graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.graph-unit-type {
  color: #9ca3af;
  font-weight: 600;
  font-size: 1.25rem;
  user-select: none;
}

.more-icon {
  color: #9ca3af;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Graph Description */
.graph-description {
  color: #111827;
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  user-select: none;
}

/* Chart Wrapper */
.chart-wrapper {
  height: 16rem;
  width: 100%;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem 0.5rem;
}

.chart-wrapper canvas {
  max-height: 100%;
  width: 100% !important;
}

/* Graph Form Section */
.graph-form-section {
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.graph-form-description {
  color: white;
  font-size: 1rem;
  text-align: center;
  user-select: none;
  margin-bottom: 0.25rem;
  max-width: 90%;
}

@media (min-width: 640px) {
  .graph-form-description {
    font-size: 1.125rem;
  }
}

.graph-form {
  display: flex;
  width: 100%;
  border-radius: 0.375rem;
  overflow: hidden;
  justify-content: center;
}

.graph-form .form-container {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

/* Responsive Styles */
@media (min-width: 640px) {
  .brochure-form-section h2 {
    font-size: 1.125rem;
  }

  .country-select,
  .phone-input {
    padding: 0.75rem;
  }

  .submit-btn {
    padding: 0.875rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .phone-input {
    padding-right: 8rem;
  }

  .desktop-btn {
    display: flex;
  }

  .mobile-btn {
    display: none;
  }

  .brochure-form-section {
    flex-direction: row;
    gap: 0;
  }

  .brochure-form-section h2 {
    text-align: left;
    width: auto;
  }
}
