/* =============================================================================
   CSS LAYERS & IMPORTS
   ============================================================================= */
@layer doodle, main, transforms;
@import url('https://fonts.googleapis.com/css2?family=Short+Stack&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Prop+Single&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap');
@import "styles/doodle/doodle.css" layer(doodle);
@import "styles/transforms.css" layer(transforms);

@layer main {

  /* =============================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================================= */
  :root {
    --primary-black: #0C0908;
    --stat-box: 26px;
  }

  /* =============================================================================
   BASE STYLES
   ============================================================================= */
  body {
    background-color: white;
    background-image: radial-gradient(#888 0.5px, transparent 0.5px);
    /* Bullet journal dots */
    background-size: 22px 22px;
    /* space between dots */
    margin: 20px;
    font-size: 16pt;
    font-family: 'Short Stack', cursive;
    /* Handwritten style font */
  }

  /* =============================================================================
   HEADER SECTION
   ============================================================================= */

  /* Main header layout container */
  #header-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    /* spacing between name and ICQ button */
    margin-bottom: -2rem;
  }

  /* Main name/title styling */
  #header-text {
    font-family: 'Permanent Marker', cursive;
    /* Hand-drawn marker style */
    font-weight: 300;
    color: var(--primary-black)
  }

  /* =============================================================================
   ICQ STATUS WIDGET
   ============================================================================= */

  /* Main ICQ button/link - styled like classic Windows 95/98 button */
  #icq {
    /* Link behavior */
    display: flex;
    text-decoration: none;
    color: inherit;
    cursor: pointer;

    /* Layout */
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 4px 8px;

    /* Classic Windows button styling */
    background-color: #c0c0c0;
    /* classic gray */
    border: 2px solid #fff;
    /* light outer border */
    border-right-color: #808080;
    /* dark on right */
    border-bottom-color: #808080;
    /* dark on bottom */
    border-left-color: #fff;
    border-top-color: #fff;
    border-radius: 3px;
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #fff;
    /* 3D effect */
  }

  /* Hover state - subtle highlight */
  #icq:hover {
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #fff, 0 0 0 1px #000;
  }

  /* Active/pressed state - inverted shadows for pressed effect */
  #icq:active {
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
  }

  /* ICQ icon container */
  #icq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Status text container */
  #icq-status {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  /* Reset paragraph margins for semantic p tags */
  #icq-status p {
    margin: 0;
  }

  /* ICQ-specific retro font styling */
  .icq-status {
    font-family: "Bitcount Prop Single", system-ui;
    /* Retro computer font */
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
      "slnt" 0,
      "CRSV" 0.5,
      "ELSH" 0,
      "ELXP" 0;
  }

  /* Small text for the ICQ number */
  .status-id {
    font-size: xx-small;
    margin-top: -3px;
  }

  /* =============================================================================
   SOCIAL LINKS BAR
   ============================================================================= */

  /* Horizontal social media links container */
  #social-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 1rem;
    margin-bottom: 0rem;
    font-family: monospace;
    /* Clean technical font for links */
    font-size: 14px;
  }

  /* Social media icons */
  #social-bar img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
  }

  /* Pipe separators between links */
  #social-bar .pipe {
    color: #666;
    user-select: none;
    /* Prevent text selection */
  }

  /* =============================================================================
   Overrides
   ============================================================================= */

  /* Horizontal rule divider */
  hr.top-fold {
    border-bottom-width: 4px;
    margin-top: 3px;
  }

  p.section-header-title {
    margin-bottom: 4px;
    font-size: 16pt;
    font-weight: 600;
  }
  hr.section-header-divider {
    border-bottom-width: 2px;
  }

  /* Base card styling for character sheet sections */
  .card {
    font-size: 12pt;
    width: 300px;
    height: 400px;
  }

  /* Thin border variant for cards */
  .borders-thin {
    border-top-width: 4px;
    border-bottom-width: 6px;
    border-left-width: 9px;
    border-right-width: 10px;
  }

  /* Add to your main.css in the Overrides section */

  /* Expanded character card */
  .character-card {
    width: 450px;
    /* Increased from 300px */
    height: 400px;
    /* Slightly taller */
  }

  /* Two-column layout for stats */
  .stats-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
  }

  .core-stats,
  .saving-throws {
    flex: 0 1 auto
  }

  .core-stats h4,
  .saving-throws h4 {
    margin: 0 0 8px 0;
    font-size: 11pt;
  }

  /* Saving throw styling - similar to stat boxes but distinct */
  .saving-throw-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .saving-throw-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
  }

  .saving-throw-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    flex-shrink: 0;

    min-width: 28px;
    /* Slightly smaller than stat boxes */
    min-height: 28px;

    /* Custom border widths for saving throws */
    border-top-width: 5px;
    border-left-width: 4px;
    border-bottom-width: 5px;
    border-right-width: 6px;
  }

  .saving-throw-name {
    font-family: 'Short Stack', cursive;
    font-size: 13px;
    /* Slightly smaller text */
  }



  /* =============================================================================
   CHARACTER STATS (RPG-style attribute scores)
   ============================================================================= */
  .stat-title {
    font-family: 'Gloria Hallelujah', cursive;
    font-weight: 600;
    font-size: 18pt;
    margin-top: 0px;
    margin-bottom: 0px;
  }

  /* Remove default list styling and add spacing */
  .stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  /* Individual stat row layout */
  .stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    /* Reduced from 8px for tighter vertical spacing */
    gap: 8px;
    /* Reduced from 12px for closer box-to-text spacing */
  }

  /* Minimal styling - let DoodleCSS handle the borders and sizing */
  .stat-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    flex-shrink: 0;
    /* Prevent box from shrinking */
    margin-left: 5px;

    /* Custom border widths - override DoodleCSS defaults for asymmetrical hand-drawn look */
    border-top-width: 6px;
    border-left-width: 5px;
    border-bottom-width: 6px;
    border-right-width: 8px;
  }

  /* Stat name styling */
  .stat-name, .saving-throw-name{
    font-family: 'Gloria Hallelujah', cursive;
    font-size: 14pt;
    font-weight: 400;
  }

  .saving-throw-item, .stat-item {
    font-weight: 100;
    font-size: 16px;
    font-family: "Short Stack", cursive;

  }

  .saving-throw-box, .stat-box {
  /* Ensure consistent width while letting DoodleCSS control borders */
    min-width: var(--stat-box);
    min-height: var(--stat-box);
    max-width: var(--stat-box);
    max-height: var(--stat-box);
  }
}