/* ============================================================
   contact.css – お問い合わせページ固有スタイル
   ============================================================ */

/* ---------- LAYOUT ---------- */
.contact-layout {
  display: grid;
  align-items: start;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 380px;
    gap: 4rem;
  }
}

/* ---------- FORM ---------- */
.contact-form {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 2rem;
}

@media (min-width: 768px) {
  .contact-form {
    padding: 3rem;
  }
}

.contact-form__title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--foreground);
}

.contact-form__desc {
  margin-bottom: 2rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.contact-form__group {
  margin-bottom: 1.5rem;
}

.contact-form__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.contact-form__required {
  display: inline-block;
  border-radius: 4px;
  background: #fee2e2;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
}

.contact-form__optional {
  display: inline-block;
  border-radius: 4px;
  background: var(--muted);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-foreground);
}

/* Radio categories */
.contact-form__categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .contact-form__categories {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__category {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.contact-form__category:hover {
  border-color: var(--upro-orange);
  background: rgba(var(--upro-orange-rgb), 0.02);
}

.contact-form__category--selected {
  border-color: var(--upro-orange);
  background: rgba(var(--upro-orange-rgb), 0.04);
  font-weight: 600;
  color: var(--upro-orange);
}

.contact-form__radio-circle {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}

.contact-form__category--selected .contact-form__radio-circle {
  border-color: var(--upro-orange);
}

.contact-form__radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--upro-orange);
  display: none;
}

.contact-form__category--selected .contact-form__radio-dot {
  display: block;
}

/* Text inputs */
.contact-form__name-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .contact-form__name-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(113, 113, 122, 0.4);
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
  border-color: var(--upro-orange);
  box-shadow: 0 0 0 3px rgba(var(--upro-orange-rgb), 0.12);
}

.contact-form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.contact-form__textarea {
  resize: vertical;
  line-height: 1.7;
}

/* Checkbox */
.contact-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.contact-form__checkbox {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--upro-orange);
}

.contact-form__checkbox-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.contact-form__checkbox-link {
  color: var(--upro-orange);
  text-decoration: underline;
}

/* Submit */
.contact-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 9999px;
  border: none;
  background: var(--upro-orange);
  padding: 1rem 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--upro-orange-rgb), 0.25);
  transition: all 0.2s;
}

.contact-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--upro-orange-rgb), 0.35);
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.contact-form__submit svg {
  width: 16px;
  height: 16px;
}

/* Success */
.contact-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 5rem 2rem;
}

.contact-form__success-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
}

.contact-form__success-icon svg {
  width: 28px;
  height: 28px;
}

.contact-form__success-title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.contact-form__success-text {
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---------- SIDEBAR ---------- */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .contact-sidebar {
    position: sticky;
    top: 6rem;
  }
}

.contact-sidebar__card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 1.75rem;
}

.contact-sidebar__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(var(--upro-orange-rgb), 0.06);
  color: var(--upro-orange);
  margin-bottom: 1rem;
}

.contact-sidebar__icon svg {
  width: 20px;
  height: 20px;
}

.contact-sidebar__title {
  margin-bottom: 0.375rem;
  font-weight: 700;
  color: var(--foreground);
}

.contact-sidebar__text {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.contact-sidebar__phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}

.contact-sidebar__phone svg {
  width: 16px;
  height: 16px;
}

.contact-sidebar__hours {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.contact-sidebar__email {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
}

/* FAQ */
.contact-faq {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
}

.contact-faq__title {
  padding: 1.5rem 1.75rem 1rem;
  font-weight: 700;
  color: var(--foreground);
}

.contact-faq__item {
  border-top: 1px solid var(--border);
}

.contact-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.75rem;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.2s;
}

.contact-faq__question:hover {
  background: var(--muted);
}

.contact-faq__toggle {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.contact-faq__item.is-open .contact-faq__toggle {
  transform: rotate(45deg);
}

.contact-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.contact-faq__item.is-open .contact-faq__answer {
  max-height: 200px;
}

.contact-faq__answer-text {
  padding: 0 1.75rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---------- STEP INDICATOR ---------- */
.contact-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.contact-steps__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.contact-steps__item--active {
  color: var(--upro-orange);
}

.contact-steps__item--done {
  color: #059669;
}

.contact-steps__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.contact-steps__item--active .contact-steps__num {
  border-color: var(--upro-orange);
  background: var(--upro-orange);
  color: #fff;
}

.contact-steps__item--done .contact-steps__num {
  border-color: #059669;
  background: #059669;
  color: #fff;
}

.contact-steps__line {
  width: 2.5rem;
  height: 2px;
  margin: 0 0.5rem;
  background: var(--border);
}

.contact-steps__line--done {
  background: #059669;
}

/* ---------- CONFIRM TABLE ---------- */
.confirm-table {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 2rem;
}

.confirm-table__row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .confirm-table__row {
    grid-template-columns: 10rem 1fr;
  }
}

.confirm-table__row:last-child {
  border-bottom: none;
}

.confirm-table__label {
  padding: 1rem 1.25rem;
  background: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--foreground);
}

.confirm-table__value {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--foreground);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- CONFIRM ACTIONS ---------- */
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .confirm-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.confirm-actions__back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-actions__back:hover {
  background: var(--muted);
}

/* ---------- COMPLETE BACK LINK ---------- */
.complete-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--upro-orange);
  transition: opacity 0.2s;
}

.complete-back:hover {
  opacity: 0.8;
}
