/* Visit Consultation Page Styles */

:root {
  --luca-black: #000000;
  --luca-text: #222222;
  --luca-muted: #666666;
  --luca-border: #e5e5e5;
  --luca-brand: #000000;
  --error: #d93025;
  --success-bg: #f0faf0;
  --success-border: #b5e0b5;
  --success-text: #137a13;
}

.loading-active {
  overflow: hidden;
}

/* Prevent header overlap if header is fixed */
.visit-consultation-page {
  max-width: 960px;
  margin: 130px auto 80px; /* header space + bottom room */
  padding: 0 20px;
  color: var(--luca-text);
  font-family: 'Noto Sans KR', Arial, Helvetica, sans-serif;
}

.consultation-header { 
  text-align: center; 
  margin-bottom: 24px; 
}
.consultation-header .logo img {
  height: 44px;
  display: block;
  margin: 12px auto 8px;
}
.consultation-header h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
}
.consultation-header p {
  color: var(--luca-muted);
  margin: 0 0 8px;
}

.consultation-form {
  background: #ffffff;
  border: 1px solid var(--luca-border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

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

.consultation-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.consent-group {
  margin-top: 8px;
}

.consent-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.consent-link {
  border: none;
  background: none;
  color: var(--luca-brand);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.consent-link:hover,
.consent-link:focus {
  text-decoration: underline;
}

.consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 34, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1100;
}

.consent-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.consent-modal {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 32px 24px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.consent-modal h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.consent-modal-body p {
  margin: 10px 0;
  line-height: 1.6;
  font-size: 15px;
}

.consent-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.consent-modal-actions {
  margin-top: 22px;
  text-align: right;
}

.consent-modal-confirm {
  background: var(--luca-brand);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
}

.consultation-form input[type="text"],
.consultation-form input[type="tel"],
.consultation-form input[type="date"] {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

.consultation-form input:focus {
  outline: none;
  border-color: #333333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.consultation-form input.error {
  border-color: var(--error);
  background: #fff7f7;
}

.error-message {
  display: none;
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
}

.success-message {
  display: none;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.loading-modal {
  background: #ffffff;
  border-radius: 10px;
  padding: 28px 32px;
  text-align: center;
  max-width: 320px;
  width: 85%;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.18);
}

.modal-state {
  display: none;
}

.modal-state.is-active {
  display: block;
}

.loading-modal p {
  margin-top: 16px;
  font-size: 16px;
  color: var(--luca-text);
  line-height: 1.5;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--luca-brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}

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

.submit-btn {
  width: 100%;
  background: var(--luca-brand);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
  .visit-consultation-page {
    margin: 110px auto 60px;
    padding: 0 16px;
  }
  .consultation-header h1 { font-size: 22px; }
}
