/* ===================================================================
   seoshin-factory-contact — Frontend Styles
   All classes prefixed with ss- to prevent WordPress theme conflicts.
   All tag selectors scoped under .ss-wrap
   =================================================================== */

/* ===== Scoped Reset ===== */
.ss-wrap,
.ss-wrap *,
.ss-wrap *::before,
.ss-wrap *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.ss-wrap {
  font-family: 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.ss-wrap a {
  text-decoration: none;
}

.ss-wrap button,
.ss-wrap input,
.ss-wrap select,
.ss-wrap textarea {
  border-radius: 0;
  font-family: 'Noto Sans KR', sans-serif;
}

.ss-wrap button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Contact Info Shortcode ===== */
.ss-contact-info {
  padding-right: 0;
}

.ss-contact-details > * + * {
  margin-top: 2rem;
}

.ss-contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.ss-contact-icon-box {
  width: 3rem;
  height: 3rem;
  background-color: #002D5D;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ss-contact-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #ffffff;
}

.ss-contact-label {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #4B5563;
  letter-spacing: 0.05em;
}

.ss-contact-email {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  color: #002D5D;
  transition: color 0.15s ease;
  text-decoration: none;
}

.ss-contact-email:hover {
  color: #D4AF37;
}

.ss-contact-hours {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  color: #111827;
}

.ss-contact-hours-note {
  font-size: 0.875rem;
  color: #4B5563;
}

/* ===== Form Shortcode ===== */
.ss-form > * + * {
  margin-top: 1.5rem;
}

.ss-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #111827;
  letter-spacing: 0.02em;
}

.ss-required-mark {
  color: #D4AF37;
}

.ss-form-input {
  width: 100%;
  padding: 1rem !important;
  border: 2px solid #e5e7eb !important;
  background-color: #ffffff !important;
  color: #111827 !important;
  font-family: 'Noto Sans KR', sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  transition: border-color 0.15s ease;
  outline: none;
  border-radius: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  box-shadow: none !important;
  text-indent: 0 !important;
}

.ss-form-input:focus {
  border-color: #002D5D !important;
}

.ss-wrap select.ss-form-input.ss-form-select,
select.ss-form-select.ss-form-input {
  appearance: menulist !important;
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  color: #111827 !important;
  background-color: #ffffff !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  padding: 1rem !important;
  opacity: 1 !important;
}

.ss-wrap select.ss-form-input.ss-form-select option,
select.ss-form-select.ss-form-input option {
  color: #111827 !important;
  background-color: #ffffff !important;
  font-family: 'Noto Sans KR', sans-serif !important;
  font-size: 1rem !important;
}

.ss-form-textarea {
  resize: none;
}

.ss-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.ss-form-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  accent-color: #002D5D;
  cursor: pointer;
  flex-shrink: 0;
}

.ss-checkbox-label {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  line-height: 1.6;
}

.ss-submit-button {
  width: 100%;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background-color: #F45A0E;
  color: #ffffff;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
}

.ss-submit-button:hover:not(:disabled) {
  background-color: #d14d0b;
}

.ss-submit-button:disabled {
  background-color: #D1D5DB;
  cursor: not-allowed;
}

/* ===== Privacy Link ===== */
.ss-privacy-link {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: #002D5D;
  background: none;
  border: none;
  border-bottom: 1px solid #002D5D;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  line-height: 1.6;
  border-radius: 0;
}

.ss-privacy-link:hover {
  color: #D4AF37;
  border-bottom-color: #D4AF37;
}

/* ===== Form Messages ===== */
.ss-form-message {
  padding: 1rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  display: none;
}

.ss-form-message.ss-success {
  display: block;
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ss-form-message.ss-error {
  display: block;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ===== Modal (body 직접 하위에 렌더링됨 — .ss-wrap 외부) ===== */
.ss-modal-overlay,
.ss-modal-overlay *,
.ss-modal-overlay *::before,
.ss-modal-overlay *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.ss-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: 'Noto Sans KR', sans-serif;
}

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

.ss-modal {
  background-color: #ffffff;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.ss-modal-overlay.ss-active .ss-modal {
  transform: translateY(0);
}

.ss-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid #002D5D;
  flex-shrink: 0;
}

.ss-modal-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #002D5D;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
}

.ss-modal-close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.ss-modal-close:hover {
  color: #002D5D;
}

.ss-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.ss-modal-body p {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 1.25rem;
  margin-top: 0;
  padding: 0;
}

.ss-modal-body p:last-child {
  margin-bottom: 0;
}

.ss-modal-body strong {
  font-weight: 700;
  color: #111827;
}

.ss-modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.ss-modal-confirm-button {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background-color: #002D5D;
  color: #ffffff;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  line-height: 1.5;
}

.ss-modal-confirm-button:hover {
  background-color: #D4AF37;
}

body.ss-modal-open {
  overflow: hidden;
}

/* ===== Loading Spinner ===== */
.ss-spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ss-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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