/* V223 final narrow visual corrections. Loaded last. */

/* Detect the real visible Admin control directly, including extreme zoom. */
#profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 7px !important;
}
#profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) > button:not(.hidden) {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

/* A tiny extra curve on the notification feed container only. */
#notificationsList.notifications-list {
  border-radius: 42px !important;
}

/* Match Agreement surfaces to the newly rounded Plus cards. */
.modal-overlay.admin-agreement-overlay > .admin-agreement-modal.modal-surface {
  border-radius: 46px !important;
}
.admin-agreement-scroll {
  border-radius: 42px !important;
}
.admin-agreement-scroll section {
  border-radius: 38px !important;
}

@media (max-width: 700px) {
  #profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  #profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) > button:not(.hidden) {
    grid-column: auto !important;
    padding-inline: 3px !important;
    font-size: clamp(9px, 3vw, 13px) !important;
  }
  #notificationsList.notifications-list {
    border-radius: 40px !important;
  }
  .modal-overlay.admin-agreement-overlay > .admin-agreement-modal.modal-surface {
    border-radius: 42px !important;
  }
  .admin-agreement-scroll {
    border-radius: 38px !important;
  }
  .admin-agreement-scroll section {
    border-radius: 34px !important;
  }
}

@media (max-width: 360px) {
  #profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  #profileModal .profile-main-actions:has(#manageAdminButton:not(.hidden)) > button:not(.hidden) {
    font-size: 9px !important;
    padding-inline: 2px !important;
  }
}
