﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;
    --font-sans: 'Inter', 'Segoe UI', sans-serif;
    --color-text: #1c2142;
    --color-text-muted: #4d5379;
    --shadow-md: 0 22px 48px rgba(73, 95, 200, 0.16);
    --shadow-lg: 0 30px 65px rgba(54, 76, 180, 0.25);
    --color-surface-strong: rgba(255, 255, 255, 0.94);
    --header-height: 4.5rem;
    --transition: 0.18s ease;
    --color-bg: #F7F6F2;
    --color-surface: #FFFFFF;
    --color-border: #E3E8E2;
    --color-primary: #2A6F67;        /* teal – przyciski w makiecie */
    --color-primary-soft: #3A8B82;   /* jaśniejszy teal do hoverów */
    --color-accent: #EAF3F1;         /* delikatne tło akcentów */
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: .18s ease;
    --shadow-soft: 0 6px 22px rgba(25, 67, 63, .08);
    --shadow-hard: 0 10px 32px rgba(25, 67, 63, .12);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    font-family: var(--font-sans);
    background: #eef1ff;
    color: var(--color-text);
    margin: 0;
    scroll-behavior: smooth;
}

a {
    color: var(--color-primary);
    cursor: pointer;
}

a:hover,
a:focus {
    color: #354dff;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--color-text);
}

p {
    color: var(--color-text-muted);
    line-height: 1.65;
}

button {
    font-family: inherit;
}

.content {
    padding-top: 0;
}

.validation-summary {
    color: #d62839;
}

.validation-message {
    color: #d62839;
}

#blazor-error-ui {
    color-scheme: light only;
    background: rgba(255, 173, 214, 0.2);
    bottom: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(233, 112, 169, 0.4);
    box-shadow: 0 18px 40px rgba(233, 112, 169, 0.22);
    box-sizing: border-box;
    display: none !important;
    left: 1rem;
    right: 1rem;
    padding: 0.9rem 1.1rem 1rem 1.2rem;
    position: fixed;
    z-index: 1000;
}

/* Allow showing only when explicitly flagged as real error */
#blazor-error-ui.show-error {
    display: block !important;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.6rem;
}

.blazor-error-boundary {
    background: rgba(233, 112, 169, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(233, 112, 169, 0.35);
}

.blazor-error-boundary::after {
    content: "Sorry, something went wrong.";
    font-weight: 600;
    color: #b32656;
}

a, button, input, textarea {
    transition: all var(--transition);
}

::selection {
    background: rgba(76, 110, 245, 0.25);
}

/* Boot screen — centrowanie i tło */
#app {
  min-height: 100svh; /* lepsze na mobile niż 100vh */
  display: grid;
  background: linear-gradient(180deg, var(--color-bg) 0%, #FFFFFF 140%)
}

.boot {
  display: grid;
  place-items: center;
  padding: 2rem;
}

/* Karta ze spinnerem */
.loading-surface {
  display: grid;
  place-items: center;
  gap: 1rem;
  width: clamp(220px, 40vw, 360px);
  padding: 2rem;
  border-radius: 24px;
  background: var(--color-surface-strong);
  border: 1px solid rgba(151,163,221,0.35);
  box-shadow: var(--shadow-md);
  text-align: center;
}

/* Spinner */
.loading-progress {
  width: clamp(64px, 12vw, 88px);
  height: auto;
  display: block;
}

.loading-progress .track {
  fill: none;
  stroke: rgba(76,110,245,.12);
  stroke-width: 8;
}

.loading-progress .indicator {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 8;
  stroke-linecap: round;
  /* dzięki pathLength=100 możemy sterować dashami w procentach */
  stroke-dasharray: 24 100;
  animation: lp-rotate 1.1s linear infinite, lp-dash 1.6s ease-in-out infinite;
  transform-origin: 50% 50%;
}

/* Tekst postępu (Blazor nadpisuje ten element procentami w trakcie ładowania) */
.loading-progress-text {
  font-weight: 600;
  color: var(--color-text);
  opacity: .9;
}

/* Animacje */
@keyframes lp-rotate {
  to { transform: rotate(360deg); }
}
@keyframes lp-dash {
  0%   { stroke-dasharray: 10 100; }
  50%  { stroke-dasharray: 60 100; }
  100% { stroke-dasharray: 10 100; }
}

/* Mniej ruchu, jeśli użytkownik tego chce */
@media (prefers-reduced-motion: reduce) {
  .loading-progress .indicator { animation: none; }
}
