/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ===========================================
 * GLOBAL STYLES
 * =========================================== */

/*
 * NOTE: With Propshaft, CSS @import doesn't work.
 * Include design-tokens.css and components.css separately
 * in your layout using stylesheet_link_tag.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', var(--font-family-ui);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--stitch-navy);
  background-color: var(--stitch-cream);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(123, 123, 168, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 197, 66, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
}

p {
  margin: 0;
}

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

/* ===========================================
 * FOCUS STYLES
 * =========================================== */

:focus-visible {
  outline: 2px solid var(--interactive-focus);
  outline-offset: 2px;
}

/* Editor에서 trix-editor focus 스타일 제거 */
trix-editor:focus-visible,
.editor__content trix-editor:focus-visible {
  outline: none;
}

/* ===========================================
 * SELECTION STYLES
 * =========================================== */

::selection {
  background-color: var(--bg-accent-subtle);
  color: var(--text-primary);
}
