/**
 * ================================================================
 * VELRA IPTV - BASE STYLES
 * ================================================================
 * 
 * Reset, Typography, and fundamental body styles.
 * Must be loaded AFTER variables.css
 * 
 * Reference: DOC/TV_UI_DESIGN_GUIDELINES.md
 * ================================================================
 */

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

/* ============================================
   CSS RESET
   ============================================ */

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

html {
  /* Prevent font size inflation on mobile/TV */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow: hidden;
  
  /* Font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Prevent text selection on TV */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove default button styles */
button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Remove default input styles */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Images */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================================
   TYPOGRAPHY CLASSES
   ============================================ */

/* Title Sizes */
.text-title-xl {
  font-size: var(--font-size-title-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.text-title-lg {
  font-size: var(--font-size-title-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.text-title {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.text-title-sm {
  font-size: var(--font-size-title-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

/* Body Sizes */
.text-body-lg {
  font-size: var(--font-size-body-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.text-body {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
}

.text-body-sm {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
}

/* Caption Sizes */
.text-caption {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-relaxed);
}

.text-caption-sm {
  font-size: var(--font-size-caption-sm);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   TEXT COLOR UTILITIES
   ============================================ */

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-muted { color: var(--color-text-muted); }
.text-disabled { color: var(--color-text-disabled); }
.text-accent { color: var(--color-text-accent); }
.text-success { color: var(--color-text-success); }
.text-warning { color: var(--color-text-warning); }
.text-error { color: var(--color-text-error); }

/* ============================================
   TEXT ALIGNMENT
   ============================================ */

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ============================================
   FONT WEIGHT UTILITIES
   ============================================ */

.font-light { font-weight: var(--font-weight-light); }
.font-regular { font-weight: var(--font-weight-regular); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ============================================
   TEXT TRANSFORM
   ============================================ */

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ============================================
   TEXT OVERFLOW
   ============================================ */

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   VELRA BRAND TEXT
   ============================================ */

.velra-gradient-text {
  background: var(--velra-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */

/* WebKit browsers (Chrome, Safari, newer Edge) */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

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

::selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

/* ============================================
   VISIBILITY UTILITIES
   ============================================ */

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

.visible {
  visibility: visible;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   CLEARFIX
   ============================================ */

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

/* 1366px (HD Ready) */
@media (max-width: 1366px) {
  body {
    font-size: var(--font-size-body-sm);
  }
}

/* 3840px (4K UHD) */
@media (min-width: 3840px) {
  body {
    font-size: var(--font-size-body-lg);
  }
}
