/* 
 * Keeran Clinical Hypnotherapy Booking System Styles
 * Matching the pink/purple elegant theme
 */

:root {
    --primary-color: #696099;
    --primary-dark: #D4A5C8;
    --secondary-color: #6B4E71;
    --accent-color: #F4E4F0;
  --text-dark: #333333;
  --text-light: #666666;
    --background-light: #FFF5FB;
  --border-color: rgba(107, 78, 113, 0.15);
    --success-color: #4CAF50;
    --error-color: #F44336;
  --shadow-sm: 0 2px 8px rgba(107, 78, 113, 0.08);
  --shadow-md: 0 4px 16px rgba(107, 78, 113, 0.12);
  --shadow-lg: 0 8px 32px rgba(107, 78, 113, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

/* Services Grid Container */
.kch-services-container {
  /* padding: 60px 20px; */
  max-width: 1400px;
  margin: 0 auto;
}

.kch-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

/* Service Card */
.kch-service-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.kch-service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Service Card Link Wrapper */
.kch-service-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.kch-service-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Prevent image container from capturing clicks */
.kch-service-card-link .kch-service-image {
  pointer-events: none;
}

.kch-service-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.kch-service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
}

/* Force pointer-events on all service images regardless of inline styles */
.kch-service-card img,
.kch-service-featured-image {
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
}

.kch-service-card:hover .kch-service-image img {
  transform: scale(1.05);
}

.kch-service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(107, 78, 113, 0.7) 100%
  );
  opacity: 0;
  transition: var(--transition);
}

.kch-service-card:hover .kch-service-overlay {
  opacity: 1;
}

.kch-service-content {
  padding: 28px;
}

.kch-doctor-info {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent-color);
}

.kch-doctor-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--secondary-color);
  margin: 0 0 4px 0;
  font-family: "poppins", serif;
}

.kch-doctor-title {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
  font-style: italic;
}

.kch-service-title {
  /* font-size: 24px; */
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.kch-service-excerpt {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0px;
  min-height: 72px;
}

.kch-service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 0px;
  border-top: 1px solid var(--border-color);
}

.kch-duration,
.kch-price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-light);
}

.kch-duration svg {
  color: var(--primary-color);
}

.kch-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary-color);
}

/* Book Now Button */
.kch-book-now-btn,
.kch-view-details-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(232, 180, 217, 0.3);
}

.kch-book-now-btn:hover,
.kch-view-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 180, 217, 0.4);
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-color) 100%
  );
}

.kch-book-now-btn svg,
.kch-view-details-btn svg {
  transition: var(--transition);
}

.kch-book-now-btn:hover svg,
.kch-view-details-btn:hover svg {
  transform: translateX(4px);
}

a.kch-view-details-btn {
  text-decoration: none;
}

/* No Services Message */
.kch-no-services {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: var(--text-light);
}

/* Booking Form Container */
.kch-booking-form-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kch-booking-form-container.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.kch-booking-form-wrapper {
  background: #ffffff;
  border-radius: 20px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.kch-close-form {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(107, 78, 113, 0.1);
  border: none;
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.kch-close-form:hover {
  background: var(--primary-color);
  transform: rotate(90deg);
}

.kch-close-form svg {
  color: #ffffff;
}

/* Booking Content Layout */
.kch-booking-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
}

.kch-form-section {
  padding: 30px;
  background: #ffffff;
}

.kch-payment-section {
  padding: 30px;
  background: var(--background-light);
  border-left: 1px solid var(--border-color);
}

/* Form Header */
.kch-form-header {
  margin-bottom: 20px;
}

.kch-form-header h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0 0 8px 0;
  font-family: "poppins", serif;
}

.kch-form-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin: 0;
}

/* Form Styles */
.kch-booking-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.kch-form-group {
  display: flex;
  flex-direction: column;
}

.kch-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kch-form-group .required {
  color: var(--error-color);
}

.kch-form-group input,
.kch-form-group select,
.kch-form-group textarea {
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-dark);
  transition: var(--transition);
  font-family: inherit;
}

.kch-form-group input:focus,
.kch-form-group select:focus,
.kch-form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(232, 180, 217, 0.1);
}

.kch-form-group input[readonly] {
  background: var(--accent-color);
  cursor: not-allowed;
}

.kch-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Form Actions */
.kch-form-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.kch-btn-primary,
.kch-btn-secondary {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.kch-btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(232, 180, 217, 0.3);
}

.kch-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 180, 217, 0.4);
}

.kch-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.kch-btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border-color);
}

.kch-btn-secondary:hover {
  background: var(--accent-color);
  border-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Payment Section */
.kch-payment-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0 0 30px 0;
}

.kch-payment-details {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.kch-payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.kch-payment-label {
  font-size: 14px;
  color: var(--text-light);
}

.kch-payment-value {
  font-size: 15px;
  color: var(--text-dark);
  font-weight: 600;
  text-align: right;
}

.kch-payment-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 0;
}

.kch-payment-total {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid var(--primary-color);
}

.kch-payment-total .kch-payment-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.kch-payment-total .kch-payment-value {
  font-size: 24px;
  color: var(--secondary-color);
}

.kch-payment-secure {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 10px;
  color: var(--success-color);
  font-size: 14px;
  font-weight: 500;
}

.kch-payment-secure svg {
  flex-shrink: 0;
}

/* Success Message */
.kch-booking-success {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.kch-success-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 60px 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.kch-success-icon {
  margin-bottom: 30px;
  animation: checkmark 0.6s ease 0.3s backwards;
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.kch-success-content h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--success-color);
  margin: 0 0 16px 0;
}

.kch-success-message {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.6;
}

.kch-booking-details {
  background: var(--background-light);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  text-align: left;
}

.kch-booking-details h3 {
  font-size: 18px;
  color: var(--secondary-color);
  margin: 0 0 16px 0;
}

/* Loading State */
.kch-btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}

.kch-btn-primary.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--secondary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

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

/* Responsive Design */
@media (max-width: 968px) {
  .kch-booking-content {
    grid-template-columns: 1fr;
  }

  .kch-payment-section {
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  .kch-services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .kch-form-row {
    grid-template-columns: 1fr;
  }

  .kch-form-section,
  .kch-payment-section {
    padding: 30px 20px;
  }

  .kch-form-header h2 {
    font-size: 26px;
  }

  .kch-form-actions {
    flex-direction: column;
  }

  .kch-booking-form-wrapper {
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
  }
}

@media (max-width: 480px) {
  /* .kch-services-container {
    padding: 40px 15px;
  } */

  .kch-service-card {
    border-radius: 12px;
  }

  .kch-service-content {
    padding: 20px;
  }
/* 
  .kch-service-title {
    font-size: 20px;
  } */
}

/* Smooth Scrollbar */
.kch-booking-form-wrapper::-webkit-scrollbar {
  width: 8px;
}

.kch-booking-form-wrapper::-webkit-scrollbar-track {
  background: var(--accent-color);
}

.kch-booking-form-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.kch-booking-form-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
