.primary-input {
  display: flex;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  align-items: center;
  align-self: stretch;
  border-radius: var(--radius-rounded-md);
  border: 1px solid var(--border-input);
  background: var(--bg-background);
  opacity: 0.7;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  color: var(--text-foreground);

  &::placeholder {
    color: var(--text-muted-foreground);
  }
  &:hover {
    opacity: 1;
  }

  &:active {
    opacity: 1;
  }

  &:focus {
    opacity: 1;
    outline: none;
  }

  &:focus-visible {
    opacity: 1;
    outline: none;
  }
}

.primary-textarea {
  display: flex;
  width: 100%;
  height: 5rem;
  min-height: 5rem;
  padding: 0.5rem 0.75rem;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  border-radius: var(--radius-rounded-md);
  border: 1px solid var(--border-input);
  background: var(--bg-background);
  color: var(--text-muted-foreground);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  opacity: 0.7;

  &:hover {
    opacity: 1;
    line-height: 1.25rem;
  }

  &:active {
    opacity: 1;

    color: var(--text-foreground);
  }

  &:focus {
    opacity: 1;
    color: var(--text-foreground);
    outline: none;
  }

  &:focus-visible {
    opacity: 1;
    color: var(--text-foreground);
    outline: none;
  }
}

.candidate-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  max-width: 12rem;
  padding: 0.25rem 0rem;
  flex-direction: column;
  align-items: flex-start;
  border-radius: var(--radius-rounded-md);
  border: 1px solid var(--border-input);
  background: var(--bg-popover);
  box-shadow: 0px 2px 4px -2px rgba(0, 0, 0, 0.1),
    0px 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 10;

  &.active {
    display: flex;
  }

  .candidate-item {
    background: var(--bg-popover);
    display: flex;
    padding: 0.375rem 0.5rem;
    align-items: flex-start;
    align-self: stretch;
    cursor: pointer;
    border-bottom: 1px solid var(--border-border);
  }

  .candidate-item:last-child {
    border-bottom: none;
  }

  .candidate-item:hover {
    background-color: var(--bg-muted);
  }
}

/* 알림 스타일 */
.notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--success-default);
  color: white;
  border-radius: var(--radius-rounded-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slide-in 0.3s ease-out;
}

.notification.fade-out {
  animation: fade-out 0.5s ease-out forwards;
}

@keyframes slide-in {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 18.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border-border);
  background: var(--background-default);
  border-radius: var(--radius-rounded-lg);
  box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1),
    0px 1px 3px 0px rgba(0, 0, 0, 0.1);

  .upload-box-header {
    display: flex;
    flex-direction: column;
    align-items: start;
    width: 100%;
    margin-bottom: 1.5rem;

    h3 {
      font-size: 1.5rem;
      line-height: 1.5;
      font-weight: 600;
    }

    span {
      color: var(--text-muted-foreground);
      font-size: 0.875rem;
      font-weight: 400;
      line-height: 1.25rem;
    }
  }

  .upload-area {
    position: relative; /* 드래그 인디케이터 위치 기준점 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    border: 2px dashed var(--bg-light-blue);
    transition: all 0.3s ease;
    gap: 0.825rem;

    i {
      font-size: 2rem;
      color: var(--text-muted-foreground);
    }

    span {
      color: var(--text-muted-foreground);
      font-size: 0.875rem;
      font-weight: 400;
      line-height: 1.25rem;
    }
  }

  .upload-area:hover {
    cursor: pointer;
    border: 2px dashed var(--stroke-color-primary);
  }

  /* 드래그앤 드롭 상태별 스타일 */
  /* 드래그 오버 상태 - 파일이 영역 위에 있을 때 */
  .upload-area.drag-over {
    border: 2px dashed var(--stroke-color-primary);
    background-color: var(--bg-light-blue); /* 연한 파란색 배경 */
    transform: scale(1.02); /* 약간의 확대 효과 */
    box-shadow: var(--shadow-lg);
  }

  /* 드래그 인디케이터 스타일 */
  .drag-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-background);
    border: 2px solid var(--stroke-color-primary);
    border-radius: var(--radius-rounded-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    pointer-events: none; /* 드래그 이벤트 방해 방지 */
  }

  .drag-indicator i {
    font-size: 2.5rem !important;
    color: var(--stroke-color-primary) !important;
    animation: bounce 1s infinite;
  }

  .drag-indicator span {
    color: var(--stroke-color-primary) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-align: center;
  }

  /* 드래그 인디케이터 애니메이션 */
  @keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-8px);
    }
    60% {
      transform: translateY(-4px);
    }
  }

  .file-uploaded {
    border: 2px solid var(--stroke-color-primary);
    background: var(--bg-light-blue);
  }

  .file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;

    span {
      color: var(--text-foreground);
    }
  }
}
