/**
 * Material Symbols - Self-Hosted Variable Fonts
 *
 * Google's Material Design 3 icon system with variable font technology.
 * Replaces FontAwesome 6.x for EIDX DRM Policy Admin (FR-054 to FR-054b).
 *
 * License: Apache 2.0
 * Source: https://github.com/google/material-design-icons
 *
 * Variable Font Axes:
 * - FILL: 0 (outlined) to 1 (filled)
 * - wght: 100 to 700 (weight)
 * - GRAD: -25 to 200 (grade/emphasis)
 * - opsz: 20 to 48 (optical size)
 */

/* ===== Font Face Declarations ===== */

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/static/fonts/material-symbols/MaterialSymbolsOutlined.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/static/fonts/material-symbols/MaterialSymbolsRounded.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Material Symbols Sharp';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/static/fonts/material-symbols/MaterialSymbolsSharp.woff2') format('woff2-variations');
}

/* ===== Base Icon Class ===== */

.material-symbols {
  font-family: 'Material Symbols Outlined';
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';

  /* Default variable font settings */
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* ===== Style Variants ===== */

/* Outlined (default) - for secondary actions and navigation */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Filled - for primary actions and active states */
.material-symbols-filled {
  font-family: 'Material Symbols Outlined';
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Rounded - for form fields and friendly UI elements */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Rounded Filled */
.material-symbols-rounded-filled {
  font-family: 'Material Symbols Rounded';
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Sharp - for technical/system UI elements */
.material-symbols-sharp {
  font-family: 'Material Symbols Sharp';
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* Sharp Filled */
.material-symbols-sharp-filled {
  font-family: 'Material Symbols Sharp';
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* ===== Size Variants ===== */

.material-symbols-sm {
  font-size: 18px;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
}

.material-symbols-md {
  font-size: 24px;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.material-symbols-lg {
  font-size: 36px;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 40;
}

.material-symbols-xl {
  font-size: 48px;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 48;
}

/* ===== Weight Variants ===== */

.material-symbols-light {
  font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
}

.material-symbols-regular {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.material-symbols-medium {
  font-variation-settings:
    'FILL' 0,
    'wght' 500,
    'GRAD' 0,
    'opsz' 24;
}

.material-symbols-bold {
  font-variation-settings:
    'FILL' 0,
    'wght' 700,
    'GRAD' 0,
    'opsz' 24;
}

/* ===== Emphasis Variants (GRAD axis) ===== */

/* High emphasis - for critical actions and warnings */
.material-symbols-emphasis-high {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 200,
    'opsz' 24;
}

/* Low emphasis - for disabled states */
.material-symbols-emphasis-low {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' -25,
    'opsz' 24;
}

/* ===== Utility Classes ===== */

/* Vertical alignment helpers */
.material-symbols-middle {
  vertical-align: middle;
}

.material-symbols-top {
  vertical-align: top;
}

.material-symbols-bottom {
  vertical-align: bottom;
}

/* Icon-only button alignment */
.btn .material-symbols {
  vertical-align: middle;
  margin-top: -2px;
}

/* Icon with text spacing */
.material-symbols + span,
span + .material-symbols {
  margin-left: 0.375rem;
}

/* Leading icon (icon before text) */
.icon-leading {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* Trailing icon (icon after text) */
.icon-trailing {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* ===== Accessibility ===== */

/* Hide decorative icons from screen readers */
.material-symbols[aria-hidden="true"] {
  pointer-events: none;
}

/* Ensure proper focus states for interactive icons */
.material-symbols:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Animation Support ===== */

.material-symbols.spin {
  animation: material-symbols-spin 1s linear infinite;
}

@keyframes material-symbols-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse animation for status indicators */
.material-symbols.pulse {
  animation: material-symbols-pulse 2s ease-in-out infinite;
}

@keyframes material-symbols-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Color Variants (Bootstrap Integration) ===== */

.material-symbols-primary {
  color: var(--bs-primary);
}

.material-symbols-secondary {
  color: var(--bs-secondary);
}

.material-symbols-success {
  color: var(--bs-success);
}

.material-symbols-danger {
  color: var(--bs-danger);
}

.material-symbols-warning {
  color: var(--bs-warning);
}

.material-symbols-info {
  color: var(--bs-info);
}

.material-symbols-light {
  color: var(--bs-light);
}

.material-symbols-dark {
  color: var(--bs-dark);
}

.material-symbols-muted {
  color: var(--bs-secondary);
  opacity: 0.65;
}

/* ===== Dark Theme Support ===== */

[data-bs-theme="dark"] .material-symbols {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-bs-theme="dark"] .material-symbols-muted {
  color: var(--bs-secondary);
  opacity: 0.5;
}

/* ===== Usage Examples (commented for reference) ===== */

/*
<!-- Outlined icon (default, navigation) -->
<span class="material-symbols material-symbols-outlined">dashboard</span>

<!-- Filled icon (primary actions) -->
<span class="material-symbols material-symbols-filled">save</span>

<!-- Rounded icon (form fields) -->
<span class="material-symbols material-symbols-rounded">search</span>

<!-- Sharp icon (system UI) -->
<span class="material-symbols material-symbols-sharp">settings</span>

<!-- Icon with size variant -->
<span class="material-symbols material-symbols-outlined material-symbols-lg">error</span>

<!-- Icon with color variant -->
<span class="material-symbols material-symbols-filled material-symbols-danger">warning</span>

<!-- Icon-only button (requires ARIA label) -->
<button class="btn btn-primary" aria-label="Save changes">
  <span class="material-symbols material-symbols-filled" aria-hidden="true">save</span>
</button>

<!-- Icon with text (leading) -->
<button class="btn btn-secondary">
  <span class="material-symbols material-symbols-outlined icon-leading" aria-hidden="true">add</span>
  <span>Add User</span>
</button>

<!-- Animated icon (loading spinner) -->
<span class="material-symbols material-symbols-outlined spin">progress_activity</span>
*/
