/* =============================================
   PDF MASTER PRO - Utility Classes
   ============================================= */

/* ===== TEXT GRADIENTS ===== */
.text-gradient-primary {
  background: linear-gradient(135deg, #6366f1, #d946ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-green {
  background: linear-gradient(135deg, #10b981, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-warm {
  background: linear-gradient(135deg, #f97316, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BG GRADIENTS ===== */
.bg-gradient-primary {
  background: linear-gradient(135deg, #6366f1, #d946ef);
}
.bg-gradient-card-1 {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(99,102,241,0.04));
}
.bg-gradient-card-2 {
  background: linear-gradient(135deg, rgba(217,70,239,0.12), rgba(217,70,239,0.04));
}
.bg-gradient-card-3 {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.04));
}
.bg-gradient-card-4 {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.04));
}
.bg-gradient-card-5 {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.04));
}
.bg-gradient-card-6 {
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
}

/* ===== SHADOWS ===== */
.shadow-soft    { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.shadow-medium  { box-shadow: 0 8px 32px rgba(0,0,0,0.10); }
.shadow-strong  { box-shadow: 0 16px 48px rgba(0,0,0,0.15); }
.shadow-primary { box-shadow: 0 8px 32px rgba(99,102,241,0.25); }
.shadow-glow    { box-shadow: 0 0 40px rgba(99,102,241,0.3); }

/* ===== BORDERS ===== */
.border-gradient {
  border: 1.5px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.border-gradient::before {
  content: '';
  position: absolute; inset: -1.5px; z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(217,70,239,0.5));
}

/* ===== CONTAINERS ===== */
.container-xl  { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.container-lg  { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.container-md  { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }

/* ===== TRUNCATION ===== */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* ===== ASPECT RATIOS ===== */
.aspect-video    { aspect-ratio: 16/9; }
.aspect-square   { aspect-ratio: 1/1; }
.aspect-portrait { aspect-ratio: 3/4; }

/* ===== TRANSITIONS ===== */
.transition-fast   { transition: all 0.15s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow   { transition: all 0.5s ease; }

/* ===== Z-INDEX SCALE ===== */
.z-base    { z-index: 0; }
.z-raised  { z-index: 10; }
.z-overlay { z-index: 100; }
.z-modal   { z-index: 9000; }
.z-toast   { z-index: 9999; }

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.not-sr-only {
  position: static; width: auto; height: auto;
  padding: 0; margin: 0; overflow: visible;
  clip: auto; white-space: normal;
}

/* ===== POINTER EVENTS ===== */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ===== DISPLAY UTILS ===== */
.hidden       { display: none !important; }
.visible      { visibility: visible; }
.invisible    { visibility: hidden; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ===== SPACING OVERRIDES ===== */
.gap-safe { gap: clamp(0.5rem, 2vw, 1.5rem); }
.p-safe   { padding: clamp(1rem, 3vw, 2rem); }

/* ===== COLOR PALETTE ICONS ===== */
.icon-primary  { color: #6366f1; }
.icon-accent   { color: #d946ef; }
.icon-success  { color: #10b981; }
.icon-warning  { color: #f59e0b; }
.icon-danger   { color: #ef4444; }
.icon-info     { color: #3b82f6; }
.icon-muted    { color: #9ca3af; }

/* ===== CATEGORY COLOR MAPS ===== */
/* Convert to PDF */
.cat-convert-to   { --cat-color: #6366f1; --cat-bg: rgba(99,102,241,0.1); }
/* Convert from PDF */
.cat-convert-from { --cat-color: #d946ef; --cat-bg: rgba(217,70,239,0.1); }
/* Edit */
.cat-edit         { --cat-color: #3b82f6; --cat-bg: rgba(59,130,246,0.1); }
/* Security */
.cat-security     { --cat-color: #10b981; --cat-bg: rgba(16,185,129,0.1); }

/* ===== TOOL ICON GRADIENTS ===== */
.tool-gradient-1  { background: linear-gradient(135deg, #667eea, #764ba2); }
.tool-gradient-2  { background: linear-gradient(135deg, #f093fb, #f5576c); }
.tool-gradient-3  { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.tool-gradient-4  { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.tool-gradient-5  { background: linear-gradient(135deg, #fa709a, #fee140); }
.tool-gradient-6  { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.tool-gradient-7  { background: linear-gradient(135deg, #fccb90, #d57eeb); }
.tool-gradient-8  { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.tool-gradient-9  { background: linear-gradient(135deg, #fd7043, #ff8a65); }
.tool-gradient-10 { background: linear-gradient(135deg, #00b09b, #96c93d); }
.tool-gradient-11 { background: linear-gradient(135deg, #ee0979, #ff6a00); }
.tool-gradient-12 { background: linear-gradient(135deg, #4776e6, #8e54e9); }
.tool-gradient-13 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.tool-gradient-14 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.tool-gradient-15 { background: linear-gradient(135deg, #c471f5, #fa71cd); }
.tool-gradient-16 { background: linear-gradient(135deg, #12c2e9, #c471ed); }
.tool-gradient-17 { background: linear-gradient(135deg, #e14fad, #f9d423); }
.tool-gradient-18 { background: linear-gradient(135deg, #0cebeb, #20e3b2); }
.tool-gradient-19 { background: linear-gradient(135deg, #ff6a00, #ee0979); }
.tool-gradient-20 { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.tool-gradient-21 { background: linear-gradient(135deg, #8360c3, #2ebf91); }
.tool-gradient-22 { background: linear-gradient(135deg, #e96c37, #f9ca24); }
.tool-gradient-23 { background: linear-gradient(135deg, #2980b9, #6dd5fa); }
.tool-gradient-24 { background: linear-gradient(135deg, #636fa4, #e8c5e5); }
.tool-gradient-25 { background: linear-gradient(135deg, #c94b4b, #4b134f); }

/* ===== RESPONSIVE HIDE ===== */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .hide-tablet { display: none !important; }
}
@media (min-width: 1025px) {
  .hide-desktop { display: none !important; }
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: rgba(99,102,241,0.25);
  color: #312e81;
}
.dark ::selection {
  background: rgba(99,102,241,0.35);
  color: #e0e7ff;
}

/* ===== SMOOTH IMAGE LOADING ===== */
img {
  transition: opacity 0.3s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
