/**
 * Join Page Styles
 * 피그마 디자인 기반 회원가입 페이지 스타일
 * Foundation CSS 변수 활용
 */

/* Join Page */
.join-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) 0;
  background: var(--color-bg-primary);
}

/* Join Container */
.join-container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-container-md);
}

/* Header Section */
.join-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.join-title {
  font-family: var(--title-1-font-family);
  font-size: var(--title-1-font-size);
  font-weight: var(--title-1-font-weight);
  line-height: var(--title-1-line-height);
  color: var(--color-text-primary);
  margin: 0;
}

/* Form */
.join-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.input-label {
  font-family: var(--label-m-font-family);
  font-size: var(--label-m-font-size);
  font-weight: var(--label-m-font-weight);
  line-height: var(--label-m-line-height);
  color: var(--color-text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  height: 44px;
  transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--color-primary);
  outline: none;
}

.input-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.input-field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--body-2-font-family);
  font-size: var(--body-2-font-size);
  font-weight: var(--body-2-font-weight);
  line-height: var(--body-2-line-height);
  color: var(--color-text-primary);
  padding: 0 var(--spacing-sm);
}

.input-field input::placeholder {
  color: var(--color-text-tertiary);
}

.input-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
}

.input-helper {
  font-family: var(--caption-s-font-family);
  font-size: var(--caption-s-font-size);
  font-weight: var(--caption-s-font-weight);
  line-height: var(--caption-s-line-height);
  color: var(--color-text-footer-quaternary);
  margin-top: var(--spacing-xs);
}

/* Checkbox Group */
.checkbox-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  background: var(--color-bg-primary);
}

.checkbox-group__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
}

.checkbox-group__item:first-child {
  padding-top: 0;
}

.checkbox-group__item:last-child {
  padding-bottom: 0;
}

.checkbox-group__divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--spacing-sm) 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  width: 100%;
}

.checkbox-input {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  border: 1px solid #bbc5cc;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease;
}

.checkbox-input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-group__item:first-child .checkbox-input {
  border-color: #bbc5cc;
}

.checkbox-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3333 4L6 11.3333L2.66667 8' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

[data-theme="dark"] .checkbox-input:checked::after {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3333 4L6 11.3333L2.66667 8' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.checkbox-label {
  font-family: var(--label-m-font-family);
  font-size: var(--label-m-font-size);
  font-weight: var(--label-m-font-weight);
  line-height: var(--label-m-line-height);
  color: var(--color-text-secondary);
  user-select: none;
  flex: 1;
}

.checkbox-label--all {
  font-size: var(--label-l-font-size);
  font-weight: var(--label-l-font-weight);
  line-height: var(--label-l-line-height);
}

/* Join Button */
.join-button {
  width: 100%;
  height: 56px;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--button-1-font-family);
  font-size: var(--button-1-font-size);
  font-weight: var(--button-1-font-weight);
  line-height: var(--button-1-line-height);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
}

.join-button:hover {
  background: var(--color-primary-dark);
}

.join-button:active {
  opacity: var(--opacity-pressed);
}

/* Login Link Button */
.login-link-button {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--button-1-font-family);
  font-size: var(--button-1-font-size);
  font-weight: var(--button-1-font-weight);
  line-height: var(--button-1-line-height);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  margin-top: var(--spacing-md);
}

.login-link-button:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .join-page {
    min-height: calc(100vh - 60px);
    padding: var(--spacing-md) 0;
    align-items: flex-start;
  }

  .join-container {
    max-width: 100%;
    padding: var(--spacing-lg) var(--spacing-container-sm);
  }

  .join-header {
    margin-bottom: var(--spacing-2xl);
  }

  .join-title {
    font-size: 24px;
    line-height: 33.6px;
  }

  .input-label {
    font-size: 12px;
  }

  .input-field input {
    font-size: 12px;
  }

  .input-helper {
    font-size: 11px;
    line-height: 16px;
  }

  .checkbox-label {
    font-size: 12px;
  }

  .checkbox-label--all {
    font-size: 14px;
  }

  .join-button,
  .login-link-button {
    font-size: 16px;
    height: 56px;
  }

  .checkbox-group {
    padding: var(--spacing-sm);
  }
}

@media (min-width: 641px) {
  .join-container {
    padding: var(--spacing-3xl) var(--spacing-container-md);
  }
}
