// ==========================================================================
// Monitor.Cat — WordPress Admin Reset
// Override WP admin chrome within .monitorcat-wrap scope
// ==========================================================================

@use 'tokens' as *;

.monitorcat-wrap {
  // Reset box model
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  // Reset WP admin defaults
  font-family: $mc-font-body;
  font-size: 1rem;
  line-height: 1.6;
  color: $mc-text;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  min-height: 400px;

  // Override WP admin heading styles
  h1, h2, h3, h4, h5, h6 {
    font-family: $mc-font-heading;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.5em;
    padding: 0;
    color: $mc-text;
  }

  // Override WP admin paragraph
  p {
    font-size: 1rem;
    line-height: 1.6;
    color: $mc-text-medium;
    margin: 0 0 1em;
  }

  // Override WP admin links
  a {
    color: $mc-primary;
    text-decoration: none;
    transition: color $mc-transition-base;

    &:hover {
      color: $mc-primary-hover;
    }

    &:focus-visible {
      outline: 3px solid $mc-cyan;
      outline-offset: 2px;
      border-radius: 4px;
    }
  }

  // Remove WP admin .wrap padding
  &.wrap {
    margin: 0;
    padding: 0;
  }

  // Reset lists
  ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  // Reset images
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  // Reset buttons (WP admin adds many styles)
  button {
    font-family: $mc-font-body;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    color: inherit;
  }

  // Reset inputs
  input,
  select,
  textarea {
    font-family: $mc-font-body;
    font-size: 1rem;
    color: $mc-text;
  }

  // Reset tables
  table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
  }

  // Override WP admin notices positioning
  .notice,
  .updated,
  .error {
    margin: 0 0 1rem;
  }

  // Override WP admin .postbox styles
  .postbox {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  // Override WP admin form-table
  .form-table {
    th,
    td {
      padding: 0;
      vertical-align: top;
    }
  }

  // Override WP admin screen-reader-text but keep accessible
  .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

// ---------------------------------------------------------------------------
// WP admin page background — replace default gray with our gradient
// Applied via body class added by AdminManager::add_body_class()
// ---------------------------------------------------------------------------
.monitorcat-admin {
  background:
    radial-gradient(ellipse 60% 50% at 10% 12%, rgba(#FF9F43, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 88% 8%, rgba(#C4B5FD, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 82% 74%, rgba(#6EE7B7, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%) !important;

  #wpcontent,
  #wpbody,
  #wpbody-content {
    background: transparent;
  }
}
