/* Thread list, detail, and post form styles. */

.thread-box-outline {
  margin: 20px 0;
  padding: 0;
}

.thread-box {
  background-color: #FAFAFA;
  position: relative;
  width: 100%;
  border: none;
  outline: none;
  box-shadow: 0rem 0.1rem 0.1rem rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    "Noto Sans JP",
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
}

.thread-box a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.thread-id {
  white-space: nowrap;
}

.thread-title {
  max-width: 20ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.pagination-container {
  display: flex;
  gap: 0;
}

.pagination-container .page-link {
  padding: 6px 12px;
  border: 1px solid #F5F5F5;
  border-radius: 0;
  text-decoration: none;
  color: #8A8A8A;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.pagination-container .page-link.active {
  color: var(--color-secondary);
  border-color: #F5F5F5;
  font-weight: bold;
}

.pagination-container .page-link.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-secondary);
  border-radius: 2px;
}

.pagination-container .page-link:hover {
  background-color: #F5F5F5;
  border-color: #F5F5F5;
  color: #777;
}

.page-dots {
  padding: 6px 12px;
  color: #777;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

.search-row {
  display: flex;
}

.search-input,
.search-select {
  flex: 1 1;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #DDD;
  border-radius: 6px;
  transition: none;
}

.search-input::placeholder {
  color: #999;
}

.search-input:focus,
.search-select:focus {
  border-color: var(--color-secondary);
  outline: none;
  box-shadow: none;
}

.thread-form .form-control,
.thread-form .form-select {
  width: 100%;
  padding: 4px 0 1px;
  border: none;
  border-bottom: 2px solid #DDD;
  font-size: 16px;
  background: transparent;
  transition: border-bottom-color 0.2s ease-in-out;
  border-radius: 0;
  color: #5A5A5A;
}

.thread-form .category-select-container {
  position: relative;
  display: inline-block;
}

.thread-form .form-label {
  display: block;
}

.thread-form .short-select {
  width: 250px;
  appearance: none;
  padding: 4px 30px 1px 1px;
  border: none;
  border-bottom: 2px solid #DDD;
  font-size: 14px;
  background: transparent;
  transition: border-bottom-color 0.2s ease-in-out;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.thread-form .category-select-container::after {
  content: "▼";
  font-size: 14px;
  color: #777;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.thread-form .short-input {
  width: 250px;
  padding: 4px 0 1px;
  border: none;
  border-bottom: 2px solid #DDD;
  font-size: 16px;
  background: transparent;
  transition: border-bottom-color 0.2s ease-in-out;
  box-shadow: none;
}

.thread-form .form-textarea {
  width: 100%;
  height: 200px;
  padding: 2px 1px;
  border: 2px solid #DDD;
  font-size: 14px;
  background: transparent;
  transition: border-bottom-color 0.2s ease-in-out;
  border-radius: 4px;
}

.thread-form .form-textarea:focus {
  border-color: var(--color-secondary);
  outline: none;
  box-shadow: none;
}

.thread-form .short-input:focus,
.thread-form .form-control:focus {
  border-bottom-color: var(--color-secondary);
  outline: none;
  box-shadow: none;
}

.thread-form input::placeholder,
.thread-form textarea::placeholder {
  font-size: 14px !important;
  color: #AAA !important;
}

.thread-form .button-container {
  text-align: center;
  margin-top: 20px;
}

.thread-form .input-error {
  border-bottom: 2px solid #FF7B7B !important;
  background-color: rgba(255, 200, 200, 0.2) !important;
  transition: border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.thread-form .input-error:focus {
  border-bottom-color: #FF5252 !important;
  outline: none;
  background-color: rgba(255, 200, 200, 0.3) !important;
}

.thread-form .text-danger {
  font-size: 14px;
  margin-top: 4px;
  display: block;
}

.thread-form .short-select.input-error {
  background-color: rgba(255, 200, 200, 0.2) !important;
}
