/* Instagram-style centered modal */
define-postactionsmodal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
}

define-postactionsmodal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

/* Dark overlay */
define-postactionsmodal .modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  animation: fadeIn 0.15s ease;
}

/* Centered modal sheet */
define-postactionsmodal .modal-sheet {
  position: relative;
  background: var(--surface-raised, #262626);
  border-radius: 12px;
  width: 400px;
  max-width: 90vw;
  overflow: hidden;
  animation: zoomIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

/* Action button */
define-postactionsmodal .modal-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: background 0.1s ease;
  min-height: 48px;
}

define-postactionsmodal .modal-action-btn:last-child {
  border-bottom: none;
}

define-postactionsmodal .modal-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

define-postactionsmodal .modal-action-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Danger actions (delete, report) */
define-postactionsmodal .modal-action-btn.danger {
  color: #ed4956;
  font-weight: 700;
}

define-postactionsmodal .modal-action-btn.danger:hover {
  background: rgba(237, 73, 86, 0.05);
}

/* Cancel button */
define-postactionsmodal .modal-action-btn.cancel {
  font-weight: 400;
  color: var(--text-primary, #fff);
}

/* Icon - hide them for cleaner Instagram look */
define-postactionsmodal .action-icon {
  display: none;
}

/* Text */
define-postactionsmodal .action-text {
  font-size: 14px;
}

/* Divider */
define-postactionsmodal .modal-divider {
  height: 8px;
  background: transparent;
  margin: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Theme support */
body.theme-dev define-postactionsmodal .modal-sheet {
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

body.theme-dev define-postactionsmodal .modal-action-btn {
  color: var(--fg);
  border-bottom-color: var(--border);
}

body.theme-dev define-postactionsmodal .modal-action-btn.danger {
  color: #ed4956;
}

body.theme-dev define-postactionsmodal .modal-action-btn:hover {
  background: var(--hover);
}

/* Light theme support */
body:not(.theme-dev) define-postactionsmodal .modal-sheet {
  background: #ffffff;
  border: 1px solid #dbdbdb;
}

body:not(.theme-dev) define-postactionsmodal .modal-action-btn {
  color: #262626;
  border-bottom-color: #dbdbdb;
}

body:not(.theme-dev) define-postactionsmodal .modal-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  define-postactionsmodal .modal-sheet {
    width: 90vw;
    max-width: 90vw;
  }
}
