/**
 * Elementor Widgets Styles for Private Hotel Booking Plugin
 */

/* Room List Widget */
.phb-room-list-widget {
  margin: 20px 0;
}

.phb-widget-title {
  font-size: 2.5em;
  font-weight: 600;
  color: #0159D3;
  margin-bottom: 15px;
  text-align: center;
}

.phb-widget-description {
  font-size: 1.1em;
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
}

.phb-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.phb-room-item {
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.phb-room-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.phb-room-image {
  width: 100%;
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.phb-room-image-placeholder {
  color: white;
  font-size: 3em;
  opacity: 0.8;
}

.phb-room-content {
  padding: 25px;
}

.phb-room-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #0159D3;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.phb-room-description {
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 20px;
}

.phb-room-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.phb-room-price {
  text-align: right;
}

.phb-price-amount {
  font-size: 1.8em;
  font-weight: 700;
  color: #0159D3;
  display: block;
}

.phb-price-period {
  font-size: 0.9em;
  color: #95a5a6;
  font-style: italic;
}

.phb-room-capacity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7f8c8d;
  font-size: 0.95em;
}

.phb-room-capacity i {
  color: #0159D3;
  font-size: 1.1em;
}

.phb-room-amenities {
  margin-top: 20px;
}

.phb-room-amenities h4 {
  font-size: 1.1em;
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.phb-room-amenities ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phb-room-amenities li {
  background: #f8f9fa;
  color: #495057;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 0.85em;
  border: 1px solid #e9ecef;
}

.phb-room-amenities li:hover {
  background: #e9ecef;
  color: #495057;
}

.phb-booking-button {
  display: inline-block;
  background: #0bc4d9;
  color: white;
  padding: 12px 25px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
}

.phb-booking-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

/* Booking Form Widget */
.phb-booking-form-widget {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.phb-booking-form {
  display: grid;
  gap: 20px;
}

.phb-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phb-form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95em;
}

.phb-form-group input,
.phb-form-group select,
.phb-form-group textarea {
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 0;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.phb-form-group input:focus,
.phb-form-group select:focus,
.phb-form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Phone Input Styling - Unified Field Appearance */
.phb-phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid #e9ecef;
  border-radius: 0;
  background: #ffffff;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.phb-phone-input-wrapper:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.phb-phone-input-wrapper:focus-within {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.phb-phone-input-wrapper:focus-within .phb-phone-country-code {
  background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
  border-right-color: #667eea;
}

.phb-phone-country-code {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-right: 1px solid #e9ecef;
  min-width: 100px;
  flex-shrink: 0;
  position: relative;
}

.phb-phone-country-code::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, #cbd5e0, transparent);
}

.phb-phone-flag {
  font-size: 1.2em;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.phb-phone-prefix {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95em;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.phb-phone-number {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
  background: transparent;
  transition: background-color 0.3s ease;
}

.phb-phone-number:hover {
  background-color: rgba(102, 126, 234, 0.02);
}

.phb-phone-number:focus {
  border: none !important;
  box-shadow: none !important;
}

/* Mobile Responsiveness for Phone Input */
@media (max-width: 768px) {
  .phb-phone-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .phb-phone-country-code {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    justify-content: center;
    padding: 10px 15px;
    min-width: auto;
  }

  .phb-phone-country-code::after {
    display: none;
  }

  .phb-phone-number {
    border-radius: 0 !important;
  }

  .phb-phone-input-wrapper:focus-within {
    transform: none;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .phb-phone-input-wrapper {
    background: #2d3748;
    border-color: #4a5568;
  }

  .phb-phone-country-code {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-right-color: #4a5568;
  }

  .phb-phone-prefix {
    color: #e2e8f0;
    text-shadow: none;
  }

  .phb-phone-number {
    color: #e2e8f0;
  }

  .phb-phone-number::placeholder {
    color: #a0aec0;
  }
}

/* Accessibility improvements */
.phb-phone-input-wrapper:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.phb-phone-number:focus {
  outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .phb-phone-input-wrapper {
    border-width: 3px;
  }

  .phb-phone-country-code {
    border-right-width: 3px;
  }
}

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

.phb-submit-button {
  background: #0bc4d9;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 0;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.phb-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.phb-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Calendar Widget */
.phb-calendar-widget {
  margin: 20px 0;
}

.phb-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.phb-calendar-nav {
  display: flex;
  gap: 10px;
}

.phb-calendar-nav button {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 8px 15px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.phb-calendar-nav button:hover {
  background: #e9ecef;
  border-color: #667eea;
}

.phb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.phb-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.phb-calendar-day:hover {
  background: #f8f9fa;
}

.phb-calendar-day.available {
  background: #d4edda;
  color: #155724;
}

.phb-calendar-day.booked {
  background: #f8d7da;
  color: #721c24;
  cursor: not-allowed;
}

.phb-calendar-day.today {
  background: #cce5ff;
  color: #004085;
  font-weight: 600;
}

.phb-calendar-day.other-month {
  color: #adb5bd;
  background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
  .phb-room-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .phb-booking-form-widget {
    padding: 20px;
    margin: 0 15px;
  }

  .phb-widget-title {
    font-size: 2em;
  }

  .phb-calendar-grid {
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  .phb-room-content {
    padding: 20px;
  }

  .phb-room-details {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .phb-room-price {
    text-align: center;
  }

  .phb-calendar-container {
    padding: 15px;
  }
}

/* Loading States */
.phb-loading {
  opacity: 0.6;
  pointer-events: none;
}

.phb-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: phb-spin 1s linear infinite;
}

@keyframes phb-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Success/Error Messages */
.phb-message {
  padding: 15px;
  border-radius: 0;
  margin: 15px 0;
  font-weight: 500;
}

.phb-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.phb-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.phb-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}