/**
 * Dr. Nicole Prommer - Contact Form Styles
 * =========================================
 * Modal-based contact form
 */

/* Modal Overlay */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.contact-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.contact-modal-overlay.active .contact-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Container */
.contact-container {
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Header */
.contact-header {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #3d3d3d 0%, #2a2a2a 100%);
  color: #fff;
}

.contact-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.contact-header-top h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.contact-header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-subtitle {
  margin: 0;
  font-size: 13px;
  color: #aaa;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  gap: 4px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #888;
  font-size: 18px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.lang-btn .flag {
  font-size: 18px;
  line-height: 1;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2);
}

.lang-btn.active {
  background: #c9a227;
}

/* Close Button */
.contact-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.contact-close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Content */
.contact-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  overscroll-behavior: contain;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group {
  margin-bottom: 16px;
}

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

.form-group label .required {
  color: #c9a227;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c9a227;
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

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

.form-group select {
  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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Checkbox Group */
.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0 0;
  accent-color: #c9a227;
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  padding-top: 0;
}

.checkbox-text a {
  color: #c9a227;
  text-decoration: underline;
}

.checkbox-text a:hover {
  color: #a8871e;
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal !important;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  accent-color: #c9a227;
  flex-shrink: 0;
  cursor: pointer;
  vertical-align: middle;
}

.radio-text {
  font-size: 14px;
  color: #555;
  line-height: 18px;
  vertical-align: middle;
}

/* Date Section */
.date-section {
  background: #f8f6f0;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid #e8d4a8;
}

.section-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.date-inputs .form-group {
  margin-bottom: 0;
}

.date-inputs label {
  font-size: 13px;
  color: #666;
}

.date-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #856404;
  background: #fff3cd;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid #c9a227;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #c9a227 0%, #a8871e 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(201,162,39,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,162,39,0.4);
}

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

.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  font-size: 16px;
}

/* Success State */
.contact-success {
  text-align: center;
  padding: 40px 28px;
}

.success-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 30px rgba(76,175,80,0.3);
}

.contact-success p {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.contact-success .success-detail {
  font-size: 13px;
  color: #888;
  margin-top: -16px;
}

/* Error State */
.contact-error {
  text-align: center;
  padding: 40px 28px;
}

.error-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  margin: 0 auto 20px;
  box-shadow: 0 8px 30px rgba(229,57,53,0.3);
}

.contact-error p {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Loading Spinner */
.spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* Honeypot (hidden) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* Prevent body scroll when modal is open */
body.contact-modal-open {
  overflow: hidden;
}

/* Responsive - Tablet */
@media (max-width: 600px) {
  .contact-modal-overlay {
    padding: 0;
  }

  .contact-container {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }

  .contact-header {
    padding: 18px 20px 16px;
  }

  .contact-header-content h2 {
    font-size: 18px;
  }

  .contact-subtitle {
    font-size: 13px;
  }

  .lang-toggle {
    padding: 2px;
  }

  .lang-btn {
    font-size: 11px;
    padding: 5px 8px;
    gap: 3px;
  }

  .lang-btn .flag {
    font-size: 13px;
  }

  .contact-close {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .contact-content {
    padding: 20px;
  }

  .date-inputs {
    grid-template-columns: 1fr;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent iOS zoom */
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .contact-header {
    flex-direction: column;
    gap: 12px;
  }

  .contact-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
