/* ===============================
   시스템 공지사항
   PC: 설정과 같은 중앙 작은 창 / 모바일: map-wrap 풀스크린
   =============================== */

#announcementsPage.listing-page {
  z-index: 10100;
}

@media (min-width: 901px) {
  #announcementsPage.open {
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  #announcementsPage .listing-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
  }

  #announcementsPage .announcements-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    min-height: 360px;
    height: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none;
  }

  #announcementsPage .listing-header {
    border-bottom: 1px solid #e8eaed;
    background: #fff;
  }
}

#announcementsPage .announcements-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

#announcementsPage .announcements-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 28px;
  -webkit-overflow-scrolling: touch;
}

.announcements-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcements-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px 14px 12px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 3px 0 0 #93c5fd;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.announcements-row:hover {
  background: #f8fbff;
  border-color: #d7e6f8;
}

.announcements-row:active {
  background: #f1f5f9;
}

.announcements-row.is-latest {
  box-shadow: inset 3px 0 0 #2563eb;
  border-color: #dbeafe;
}

.announcements-row__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
}

.announcements-row__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.announcements-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.announcements-row__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.announcements-row__title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcements-row__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.announcements-row__date {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.announcements-row__chevron {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
}

.announcements-empty {
  margin: 28px 0 0;
  padding: 28px 18px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
  background: #fff;
  border: 1px dashed #dbe3ee;
  border-radius: 12px;
  line-height: 1.5;
}

.announcements-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
}

.announcements-empty__icon svg {
  width: 22px;
  height: 22px;
}

.announcements-empty__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.announcements-empty__text {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.announcements-detail {
  padding: 4px 0 8px;
}

.announcements-detail__hero {
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8eef5;
  box-shadow: inset 3px 0 0 #2563eb;
}

.announcements-detail__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-word;
}

.announcements-detail__meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.announcements-detail__body {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8eef5;
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.announcements-detail__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 4px;
}

.announcements-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  color: #333;
}

.announcements-btn:hover {
  background: #f5f5f5;
}

.announcements-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.announcements-btn--primary:hover {
  background: #1d4ed8;
}

.announcements-btn--danger {
  color: #dc2626;
  border-color: #fecaca;
}

.announcements-btn--danger:hover {
  background: #fef2f2;
}

.announcements-compose {
  padding: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcements-compose__label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.announcements-compose__input,
.announcements-compose__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  background: #fff;
}

.announcements-compose__input:focus,
.announcements-compose__textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.announcements-compose__textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.55;
}

.announcements-compose__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.announcements-header__actions {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#announcementsPage .listing-header__back {
  order: 0;
}

#announcementsPage .listing-header__title {
  order: 1;
  flex: 0 0 auto;
  margin: 0;
}

#announcementsPage .listing-header__count {
  flex: 0 0 auto;
  margin: 0;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.listing-header__write {
  flex-shrink: 0;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.listing-header__write:hover {
  background: #1d4ed8;
}

.listing-header__write[hidden] {
  display: none;
}
