/**
 * Edu Vanguard - Material Design 3 Expressive Common Styles
 * Developed by DST Team Developers
 * Typography: Quicksand
 */

/* ==========================================================================
 * SELF-HOSTED TYPOGRAPHY (Quicksand + Material Symbols Rounded)
 * ========================================================================== */
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/quicksand-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/quicksand-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/quicksand-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/material-symbols-subset.woff2') format('woff2');
}

.material-symbols-round,
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded' !important;
  font-weight: normal !important;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
 * BASE RESETS & INPUT FOCUS
 * ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--md-sys-color-surface, #F5FBF5);
  color: var(--md-sys-color-on-surface, #171D19);
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, .allow-select {
  user-select: text !important;
  -webkit-user-select: text !important;
}

::selection {
  background-color: var(--md-sys-color-primary-container, #A9F2CD) !important;
  color: var(--md-sys-color-on-primary-container, #002114) !important;
}

/* ==========================================================================
 * M3 INPUT FIELDS
 * ========================================================================== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
}

.input-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant, #404943);
  letter-spacing: 0.1px;
}

.input-field-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.input-field-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: var(--md-sys-color-outline, #707973);
  font-size: 20px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-field {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 44px;
  background-color: var(--md-sys-color-surface-container-low, #EFF5EF);
  border: 1.5px solid transparent !important;
  border-radius: 16px;
  font-size: 15px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-weight: 600 !important;
  color: var(--md-sys-color-on-surface, #171D19);
  outline: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  background-color: var(--md-sys-color-surface-container-lowest, #FFFFFF);
  border-color: var(--md-sys-color-primary, #206A4D) !important;
  box-shadow: 0 0 0 3px rgba(32, 106, 77, 0.15) !important;
}

.input-field:focus + .input-icon,
.input-field-wrap:focus-within .input-icon {
  color: var(--md-sys-color-primary, #206A4D);
}

/* Autofill fixes */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--md-sys-color-surface-container-low, #EFF5EF) inset !important;
  -webkit-text-fill-color: var(--md-sys-color-on-surface, #171D19) !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* ==========================================================================
 * M3 BUTTONS
 * ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 9999px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1),
              background-color 0.18s ease,
              box-shadow 0.18s ease,
              opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-filled {
  background-color: var(--md-sys-color-primary, #206A4D);
  color: var(--md-sys-color-on-primary, #FFFFFF);
  box-shadow: 0 2px 6px rgba(32, 106, 77, 0.25);
}

.btn-filled:hover:not(:disabled) {
  background-color: #17533C;
  box-shadow: 0 4px 12px rgba(32, 106, 77, 0.35);
}

.btn-tonal {
  background-color: var(--md-sys-color-secondary-container, #CFE9D9);
  color: var(--md-sys-color-on-secondary-container, #0A1F16);
}

.btn-tonal:hover:not(:disabled) {
  background-color: #BCDCC7;
}

.btn-outlined {
  background-color: transparent;
  color: var(--md-sys-color-primary, #206A4D);
  border: 1.5px solid var(--md-sys-color-outline-variant, #BFC9C1) !important;
}

.btn-outlined:hover:not(:disabled) {
  background-color: rgba(32, 106, 77, 0.06);
  border-color: var(--md-sys-color-primary, #206A4D) !important;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
 * EDU VANGUARD BRAND FOOTER
 * ========================================================================== */
.brand-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  color: var(--md-sys-color-on-surface-variant, #404943);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.brand-footer-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.brand-footer-text {
  font-weight: 700;
  color: var(--md-sys-color-primary, #206A4D);
}

.brand-footer-by {
  font-weight: 500;
  color: var(--md-sys-color-outline, #707973);
}

.brand-dst-text {
  height: 16px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
 * SPINNER & UTILITIES
 * ========================================================================== */
.spinner-ring {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
