/* =============================================
   LSK Construction - Styleguide
   Centralni fajl za konzistentnost stilova
   ============================================= */

/* === CSS VARIABLES === */
:root {
  /* Colors - Primary */
  --color-primary: #ff6500;
  --color-primary-hover: #e55a00;
  --color-primary-light: rgba(255, 101, 0, 0.1);
  --color-primary-shadow: rgba(255, 101, 0, 0.2);
  --color-on-primary: #ffffff;

  /* Colors - Secondary */
  --color-secondary: #cc5200;
  --color-on-secondary: #ffffff;

  /* Colors - Surface */
  --color-surface: #f5f5f5;
  --color-surface-container: #eeeeee;
  --color-on-surface: #1a1a1a;
  --color-on-surface-variant: #474747;
  --color-inverse-surface: #2f2f2f;

  /* Colors - Outline */
  --color-outline: #d1d1d1;
  --color-outline-variant: #e7e5e4;

  /* Colors - Accent */
  --color-accent: #b55757;

  /* Colors - Basic */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-error: #ba1a1a;

  /* Typography */
  --font-family-headline: 'Inter', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  --font-family-label: 'Inter', sans-serif;
  --font-family-display: 'Inter', sans-serif;

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Border Radius */
  --radius-default: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --radius-sm: 0.5rem;
  --radius-2xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 20px 40px rgba(255, 101, 0, 0.15);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 50;
  --z-overlay: 100;
  --z-modal: 200;
  --z-toast: 9999;
}

/* === LAYOUT & UTILITY CLASSES === */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Blueprint grid background */
.blueprint-grid {
  background-color: var(--color-surface);
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Material icons */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* === TOAST NOTIFICATION === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: 600;
  z-index: var(--z-toast);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--color-on-surface);
  color: var(--color-white);
}

.toast.error {
  background: var(--color-error);
  color: var(--color-white);
}

/* === FORM ELEMENTS === */

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px var(--color-primary-shadow);
}

/* Loading spinner for buttons */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === NAVIGATION === */

/* Active nav link */
.nav-link.active {
  color: var(--color-black) !important;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 4px;
}

/* === IMAGE LOADING === */

/* Image placeholder shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.img-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* === COMMON COMPONENT STYLES === */

/* Primary button base */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-family-headline);
  font-weight: var(--font-weight-black);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Card base */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 25px 50px -12px rgba(255, 101, 0, 0.05);
}

/* Input base */
.input {
  width: 100%;
  background-color: #fafaf9;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-xl);
  padding: 1rem;
  font-family: var(--font-family-body);
  transition: all var(--transition-normal);
}

.input:focus {
  background-color: var(--color-white);
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-shadow);
}

/* Section border accent */
.border-accent {
  border-left: 4px solid var(--color-primary);
}
