.announcement-edit-modal[hidden] {
  display: none !important;
}

.announcement-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 10150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.announcement-edit-modal.is-open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.announcement-edit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.announcement-edit-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 96vw);
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(244, 208, 111, 0.45);
  background: linear-gradient(180deg, #141820 0%, #0a0c12 100%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 48px rgba(244, 208, 111, 0.1);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.announcement-edit-modal.is-open .announcement-edit-modal__panel {
  transform: scale(1) translateY(0);
}

.announcement-edit-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 208, 111, 0.35);
  border-radius: 6px;
  background: rgba(12, 14, 20, 0.9);
  color: #f4d06f;
  cursor: pointer;
}

.announcement-edit-modal__head {
  padding: 1.1rem 1.2rem 0.5rem;
  padding-right: 3rem;
  border-bottom: 1px solid rgba(244, 208, 111, 0.12);
}

.announcement-edit-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f4d06f;
}

.announcement-edit-modal__lead {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: rgba(247, 234, 208, 0.65);
  line-height: 1.45;
}

.announcement-edit-modal__body {
  overflow: auto;
  padding: 0.85rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-edit-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px solid rgba(244, 208, 111, 0.12);
}

body.announcement-edit-modal-open {
  overflow: hidden;
}

.ann-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ann-edit-field > span {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(247, 234, 208, 0.72);
}

.ann-edit-textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(244, 208, 111, 0.28);
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.85);
  color: #f7ead0;
  font-size: 0.875rem;
  line-height: 1.45;
  resize: vertical;
}

.ann-edit-field--preview {
  margin-top: 0.15rem;
}

.ann-edit-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(247, 234, 208, 0.72);
}

.ann-edit-preview {
  border-radius: 8px;
  border: 1px dashed rgba(244, 208, 111, 0.35);
  overflow: hidden;
  min-height: 2.25rem;
  font-size: 0.85rem;
  text-align: center;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.ann-edit-color-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ann-edit-color-input {
  width: 48px;
  height: 38px;
  padding: 2px;
  border: 1px solid rgba(244, 208, 111, 0.3);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.ann-edit-hex-input {
  flex: 1;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(244, 208, 111, 0.28);
  border-radius: 6px;
  background: rgba(8, 10, 16, 0.85);
  color: #f7ead0;
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.ann-edit-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.ann-edit-tab {
  flex: 1;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(244, 208, 111, 0.25);
  border-radius: 7px;
  background: rgba(8, 10, 16, 0.6);
  color: rgba(247, 234, 208, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ann-edit-tab.is-active {
  background: rgba(244, 208, 111, 0.14);
  border-color: rgba(244, 208, 111, 0.55);
  color: #f4d06f;
}

.ann-edit-grad-preview {
  height: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(244, 208, 111, 0.22);
  margin-bottom: 0.65rem;
}

.ann-edit-grad-hint {
  margin: -0.35rem 0 0.55rem;
  font-size: 0.72rem;
  color: rgba(247, 234, 208, 0.55);
  line-height: 1.4;
}

.ann-edit-preset.is-selected {
  border-color: rgba(244, 208, 111, 0.75);
  box-shadow: 0 0 0 1px rgba(244, 208, 111, 0.35);
}

.ann-edit-grad-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.ann-edit-grad-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: rgba(247, 234, 208, 0.65);
}

.ann-edit-grad-controls label input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(244, 208, 111, 0.28);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.ann-edit-grad-controls label.ann-edit-grad-angle {
  grid-column: 1 / -1;
}

.ann-edit-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.45rem;
}

.ann-edit-preset {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem;
  border: 1px solid rgba(244, 208, 111, 0.2);
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.5);
  cursor: pointer;
  text-align: left;
}

.ann-edit-preset:hover {
  border-color: rgba(244, 208, 111, 0.45);
}

.ann-edit-preset__swatch {
  display: block;
  height: 1.75rem;
  border-radius: 5px;
}

.ann-edit-preset__label {
  font-size: 0.65rem;
  color: rgba(247, 234, 208, 0.72);
  line-height: 1.2;
}

.ann-edit-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: #f7ead0;
}

.ann-edit-toggle-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #d4af5f;
}

.ann-edit-scroll-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.45);
  border: 1px solid rgba(244, 208, 111, 0.14);
}

.ann-edit-scroll-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(247, 234, 208, 0.72);
}

.ann-edit-scroll-panel input[type="range"] {
  width: 100%;
  accent-color: #d4af5f;
}

.announcement__gap {
  padding: 0 1.5rem;
}

.newsletter-edit-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.newsletter-edit-preview__left {
  flex: 1 1 220px;
  min-width: 0;
}

.newsletter-edit-preview__right {
  flex: 1 1 200px;
  min-width: 0;
}

.ann-edit-field-hint {
  font-size: 0.75rem;
  color: rgba(247, 234, 208, 0.65);
  margin: 0.35rem 0 0;
}
