/* ========================================
   Notices
======================================== */

.notices-page {
  padding-block: 40px 80px;
}

.notices__hero {
  margin-bottom: 32px;
}

.notices__hero h1 {
  margin-bottom: 8px;
}

.notices__hero p {
  max-width: 700px;
  margin: 0;
  color: var(--text-secondary);
}

/* ========================================
   Personal Vocabulary Feature
======================================== */

.notices__feature {
  margin: 28px 0 32px;
  padding: 24px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.notices__feature h2 {
  margin: 0 0 20px;
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 700;
}

.notices__feature-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.notices__feature-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.notices__feature-label {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.notices__feature-arrow {
  margin: 2px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.notices__feature-value {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.notices__feature-connector {
  color: #94a3b8;
  font-size: 1.2rem;
  font-weight: 700;
}

.notices__feature-description {
  margin: 20px 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.notices__feature-description span {
  font-weight: 700;
}

/* ========================================
   Notices Toolbar
======================================== */

.notices__toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.notices__add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 46px;
  padding: 0 18px;

  border: none;
  border-radius: 10px;

  background: var(--primary-color);
  color: #fff;

  font: inherit;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.notices__add-button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.notices__add-button:active {
  transform: translateY(0);
}

.notices__add-button span:first-child {
  font-size: 1.3rem;
  line-height: 1;
}

/* ========================================
   Search
======================================== */

.notices__search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.notices__search-icon {
  position: absolute;
  top: 50%;
  left: 14px;

  transform: translateY(-50%);

  pointer-events: none;
}

.notices__search input {
  width: 100%;
  min-height: 46px;

  padding: 0 14px 0 42px;

  border: 1px solid var(--border-color);
  border-radius: 10px;

  background: var(--card-background-color);
  color: var(--text-primary);

  font: inherit;

  outline: none;

  transition: border-color 0.2s ease;
}

.notices__search input:focus {
  border-color: var(--primary-color);
}

.notices__search input::placeholder {
  color: var(--text-secondary);
}

/* ========================================
   Notices Content
======================================== */

.notices__content {
  width: 100%;
}

.notices__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ========================================
   Notice Card
======================================== */

.notice-card {
  position: relative;

  padding: 24px;

  border: 1px solid var(--border-color);
  border-radius: 14px;

  background: var(--color-surface);

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.notice-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 18px;
}

.notice-card__term {
  margin: 0;

  color: var(--text-primary);

  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.notice-card__type {
  margin-top: 5px;

  color: var(--primary-color);

  font-size: 0.85rem;
  font-weight: 700;
}

.notice-card__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.notice-card__remove svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-card__remove:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.notice-card__remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Notice Translation
======================================== */

.notice-card__translation {
  margin-bottom: 18px;

  color: var(--text-primary);

  background: #f7fbff;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;

  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}

.notice-card__pronunciation {
  margin-bottom: 22px;

  color: var(--text-secondary);

  font-size: 0.9rem;
  font-family: monospace;
}

/* ========================================
   Notice Example
======================================== */

.notice-card__example {
  padding-top: 18px;

  border-top: 1px solid var(--border-color);
}

.notice-card__example-label {
  margin-bottom: 8px;

  color: var(--text-secondary);

  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notice-card__example-original {
  margin-bottom: 6px;

  color: var(--text-primary);

  line-height: 1.5;
}

.notice-card__example-translated {
  background: #f7fbff;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;

  font-size: 0.95rem;
  line-height: 1.5;
}

/* ========================================
   Add Notice Modal
======================================== */

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.45);
}

.notice-modal.hidden {
  display: none;
}

.notice-modal__content {
  width: 100%;
  max-width: 520px;

  padding: 28px;

  border-radius: 16px;

  background: var(--background-color);

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.notice-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 24px;
}

.notice-modal__header h2 {
  margin: 0 0 6px;
}

.notice-modal__header p {
  margin: 0;

  color: var(--text-secondary);
}

.notice-modal__close {
  flex-shrink: 0;

  width: 36px;
  height: 36px;

  border: none;
  border-radius: 8px;

  background: transparent;
  color: var(--text-secondary);

  font-size: 1rem;

  cursor: pointer;
}

.notice-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ========================================
   Notice Form
======================================== */

.notice-form__field {
  margin-bottom: 20px;
}

.notice-form__field label {
  display: block;

  margin-bottom: 8px;

  font-weight: 600;
}

.notice-form__field input {
  width: 100%;
  min-height: 48px;

  padding: 0 14px;

  border: 1px solid var(--border-color);
  border-radius: 10px;

  background: var(--background-color);
  color: var(--text-primary);

  font: inherit;

  outline: none;

  box-sizing: border-box;
}

.notice-form__field input:focus {
  border-color: var(--primary-color);
}

/* ========================================
   Notice Form Actions
======================================== */

.notice-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notice-form__cancel,
.notice-form__translate {
  min-height: 44px;

  padding: 0 18px;

  border-radius: 10px;

  font: inherit;
  font-weight: 600;

  cursor: pointer;
}

.notice-form__cancel {
  border: 1px solid var(--border-color);

  background: transparent;
  color: var(--text-primary);
}

.notice-form__translate {
  border: none;

  background: var(--primary-color);
  color: #fff;
}

/* ========================================
   Loading State
======================================== */

.notices-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.notices-loading.hidden {
  display: none;
}

.notices-loading__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top-color: var(--text-secondary);
  border-radius: 50%;
  animation: notices-loading-spin 0.8s linear infinite;
}

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

/* ========================================
   Empty State
======================================== */

.notices__empty {
  padding: 60px 20px;

  text-align: center;

  color: var(--text-secondary);
}

.notices__empty-icon {
  margin-bottom: 16px;

  font-size: 2.5rem;
}

.notices__empty h2 {
  margin-bottom: 8px;

  color: var(--text-primary);

  font-size: 1.3rem;
}

.notices__empty p {
  max-width: 480px;
  margin: 0 auto;
}

/* ========================================
   Notice Translation Result
======================================== */

.notice-translation {
  margin-bottom: 24px;
  padding: 20px;

  border: 1px solid var(--border-color);
  border-radius: 12px;

  background: var(--background-color);
}

.notice-translation.hidden {
  display: none;
}

.notice-translation__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notice-translation__original {
  margin-bottom: 4px;

  color: var(--text-primary);

  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.notice-translation__text {
  margin-bottom: 4px;

  color: var(--text-primary);

  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.notice-translation__type {
  color: var(--text-secondary);

  font-size: 0.85rem;
}

.notice-translation__pronunciation-button {
  flex-shrink: 0;

  width: 38px;
  height: 38px;

  border: none;
  border-radius: 8px;

  background: transparent;
  color: var(--text-secondary);

  font-size: 1.1rem;

  cursor: pointer;

  transition: background-color 0.2s ease;
}

.notice-translation__pronunciation-button:hover {
  background: rgba(0, 0, 0, 0.06);
}

.notice-translation__pronunciation {
  margin-top: 12px;

  color: var(--text-secondary);

  font-family: monospace;
  font-size: 0.9rem;
}

/* ========================================
   Translation Example
======================================== */

.notice-translation__example {
  margin-top: 20px;
  padding-top: 18px;

  border-top: 1px solid var(--border-color);
}

.notice-translation__example-label {
  margin-bottom: 8px;

  color: var(--text-secondary);

  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notice-translation__example-original {
  margin-bottom: 6px;

  color: var(--text-primary);

  line-height: 1.5;
}

.notice-translation__example-translated {
  color: var(--text-secondary);

  font-size: 0.95rem;
  line-height: 1.5;
}

/* ========================================
   Save Notice
======================================== */

.notice-translation__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.notice-translation__save {
  min-height: 44px;

  padding: 0 18px;

  border: none;
  border-radius: 10px;

  background: var(--primary-color);
  color: #fff;

  font: inherit;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.notice-translation__save:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.notice-translation__save:active {
  transform: translateY(0);
}

.notice-form-status {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.notice-form-status--loading {
  color: var(--text-secondary);
}

.notice-form-status--success {
  color: #2e7d32;
}

.notice-form-status--error {
  color: #c62828;
}

.notice-card__term-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-card__pronunciation-button {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.notice-card__pronunciation-button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}
/* ========================================
   Responsive
======================================== */

@media (max-width: 767px) {
  .notices-page {
    padding-block: 28px 60px;
  }

  .notices__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .notices__add-button {
    width: 100%;
  }

  .notices__search {
    max-width: none;
  }

  .notices__list {
    grid-template-columns: 1fr;
  }

  .notice-card {
    padding: 20px;
  }

  .notice-card__term {
    font-size: 1.2rem;
  }

  .notice-modal {
    align-items: flex-end;

    padding: 12px;
  }

  .notice-modal__content {
    max-width: none;

    padding: 22px;

    border-radius: 16px 16px 12px 12px;
  }

  .notice-form__actions {
    flex-direction: column-reverse;
  }

  .notice-form__cancel,
  .notice-form__translate {
    width: 100%;
  }

  .notice-translation {
    padding: 16px;
  }

  .notice-translation__text {
    font-size: 1.1rem;
  }

  .notice-translation__actions {
    align-items: stretch;
  }

  .notice-translation__save {
    width: 100%;
  }

  .notice-translation__save {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .notices__feature {
    margin: 24px 0 28px;
    padding: 20px 12px;
  }

  .notices__feature h2 {
    margin-bottom: 18px;
    font-size: 1.05rem;
  }

  .notices__feature-steps {
    gap: 6px;
  }

  .notices__feature-step {
    min-width: 0;
    flex: 1;
  }

  .notices__feature-label,
  .notices__feature-value {
    font-size: 0.78rem;
  }

  .notices__feature-connector {
    font-size: 1rem;
  }

  .notices__feature-description {
    margin-top: 18px;
    font-size: 0.82rem;
  }
}
