/* ========================================
   Booking Widget Styles
   ======================================== */

.booking-widget {
  --bw-primary: #2C4A3E;
  --bw-primary-dark: #1A3028;
  --bw-accent: #B8860B;
  --bw-bg: #FDFCF9;
  --bw-bg-alt: #F4F1EB;
  --bw-text: #1A1A1A;
  --bw-text-light: #5C5C5C;
  --bw-border: #D4CFC4;
  --bw-error: #9B3B3B;

  font-family: 'Playfair Display', Georgia, serif;
  background: var(--bw-bg);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(44,74,62,0.12);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.booking-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

/* Header */
.bw-header {
  background: linear-gradient(145deg, var(--bw-primary), var(--bw-primary-dark));
  padding: 28px 20px;
  text-align: center;
  position: relative;
}

.bw-header::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.3rem;
  opacity: 0.6;
}

.bw-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  font-style: italic;
}

.bw-header p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

/* Body */
.bw-body {
  padding: 20px;
}

/* Section Title */
.bw-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bw-primary-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--bw-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Calendar */
.bw-calendar {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--bw-border);
}

.bw-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.bw-cal-nav button {
  background: var(--bw-bg-alt);
  border: 1px solid var(--bw-border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--bw-primary);
  flex-shrink: 0;
  transition: all 0.2s;
}

.bw-cal-nav button:hover {
  background: var(--bw-primary);
  color: white;
}

.bw-cal-month {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bw-primary-dark);
  font-style: italic;
  text-align: center;
}

.bw-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  width: 100%;
}

.bw-cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--bw-text-light);
  padding: 6px 2px;
}

.bw-cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
}

.bw-cal-day:hover:not(.disabled):not(.booked) {
  background: var(--bw-bg-alt);
}

.bw-cal-day.disabled {
  color: #ccc;
  cursor: not-allowed;
}

.bw-cal-day.booked {
  background: repeating-linear-gradient(-45deg, #F5EAEA, #F5EAEA 2px, #FDF5F5 2px, #FDF5F5 4px);
  color: var(--bw-error);
  cursor: not-allowed;
}

.bw-cal-day.selected {
  background: var(--bw-primary);
  color: white;
}

.bw-cal-day.in-range {
  background: var(--bw-primary);
  opacity: 0.7;
  color: white;
}

.bw-day-price {
  font-size: 0.5rem;
  opacity: 0.7;
  margin-top: 1px;
}

/* Legend */
.bw-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bw-border);
  flex-wrap: wrap;
}

.bw-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--bw-text-light);
}

.bw-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.bw-legend-dot.available {
  background: white;
  border: 1px solid var(--bw-border);
}

.bw-legend-dot.selected {
  background: var(--bw-primary);
}

.bw-legend-dot.booked {
  background: repeating-linear-gradient(-45deg, #F5EAEA, #F5EAEA 2px, #FDF5F5 2px, #FDF5F5 4px);
  border: 1px solid #E5D6D6;
}

/* Selection Box */
.bw-selection {
  background: linear-gradient(135deg, var(--bw-bg-alt), #EDE9E0);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--bw-border);
}

.bw-selection-dates {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--bw-primary-dark);
  margin-bottom: 6px;
  font-style: italic;
}

.bw-selection-nights {
  font-size: 0.85rem;
  color: var(--bw-text-light);
}

.bw-selection-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bw-accent);
  margin-top: 10px;
}

/* Breakdown */
.bw-breakdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--bw-border);
  text-align: left;
}

.bw-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--bw-text-light);
  padding: 3px 0;
}

.bw-breakdown-row.total {
  font-weight: 600;
  color: var(--bw-text);
  font-size: 0.9rem;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--bw-border);
}

/* Form */
.bw-form-group {
  margin-bottom: 16px;
}

.bw-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--bw-text);
}

.bw-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bw-border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bw-form-input:focus {
  outline: none;
  border-color: var(--bw-primary);
  box-shadow: 0 0 0 3px rgba(44,74,62,0.1);
}

.bw-form-input::placeholder {
  color: var(--bw-text-light);
  opacity: 0.5;
  font-style: italic;
}

.bw-form-input.error {
  border-color: var(--bw-error);
}

.bw-form-error {
  font-size: 0.8rem;
  color: var(--bw-error);
  margin-top: 5px;
  font-style: italic;
}

/* Guests */
.bw-guests {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bw-guests button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--bw-border);
  background: white;
  border-radius: 10px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--bw-primary);
  flex-shrink: 0;
  transition: all 0.2s;
}

.bw-guests button:hover:not(:disabled) {
  background: var(--bw-primary);
  color: white;
}

.bw-guests button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bw-guests-count {
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 80px;
  text-align: center;
}

/* Submit */
.bw-submit {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(145deg, var(--bw-primary), var(--bw-primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
  transition: all 0.2s;
}

.bw-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44,74,62,0.25);
}

.bw-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Privacy */
.bw-privacy {
  font-size: 0.7rem;
  color: var(--bw-text-light);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

.bw-privacy a {
  color: var(--bw-primary);
  text-decoration: none;
}

.bw-privacy a:hover {
  text-decoration: underline;
}

/* Loading */
.bw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.bw-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bw-border);
  border-top-color: var(--bw-primary);
  border-radius: 50%;
  animation: bw-spin 0.8s linear infinite;
}

@keyframes bw-spin {
  to { transform: rotate(360deg); }
}

/* Success */
.bw-success {
  text-align: center;
  padding: 40px 20px;
}

.bw-success-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(145deg, var(--bw-primary), var(--bw-primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
}

.bw-success-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--bw-primary-dark);
  margin-bottom: 10px;
  font-style: italic;
}

.bw-success-text {
  color: var(--bw-text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.bw-success-details {
  background: var(--bw-bg-alt);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  text-align: left;
  border: 1px solid var(--bw-border);
}

.bw-success-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bw-border);
  font-size: 0.85rem;
}

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

.bw-success-label {
  color: var(--bw-text-light);
}

.bw-success-value {
  font-weight: 600;
}

.bw-new-btn {
  margin-top: 20px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--bw-primary);
  color: var(--bw-primary);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.bw-new-btn:hover {
  background: var(--bw-primary);
  color: white;
}

/* Error Banner */
.bw-error-banner {
  background: #FDF5F5;
  border: 1px solid #E5D6D6;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  color: var(--bw-error);
  font-size: 0.85rem;
}
