/* Fonts - Local (Poppins wszędzie, Inter tylko w polach formularzy) */

html, body, .font-sans {
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-display,
.font-heading {
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -0.015em;
}

/* Pola formularzy zostają na Inter — lepsza czytelność małego tekstu w UI */
input, textarea, select {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* --- Poppins (nagłówki) — wagi 500 / 600 / 700, latin + latin-ext --- */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-500-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: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-500-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: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600-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: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600-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: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700-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: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700-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;
}

/* --- Inter (tekst, UI) --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/inter-800.woff2') format('woff2');
}

/* Alpine.js cloak - hide elements until Alpine loads */
[x-cloak] {
    display: none !important;
}

/* Base utility classes missing from Tailwind build */
.pt-14 { padding-top: 3.5rem; }
.-translate-x-full { transform: translateX(-100%); }
.translate-x-0 { transform: translateX(0); }
.col-span-2 { grid-column: span 2 / span 2; }
.-mr-2 { margin-right: -0.5rem; }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }

/* Responsive classes for small screens (sm: breakpoint = 640px) */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:justify-between { justify-content: space-between; }
    .sm\:gap-3 { gap: 0.75rem; }
    .sm\:w-auto { width: auto; }
    .sm\:text-left { text-align: left; }
}

/* Responsive classes for desktop (md: breakpoint = 768px) */
@media (min-width: 768px) {
    /* Force sidebar visible on desktop regardless of Alpine classes */
    aside.sidebar-desktop-visible {
        transform: translateX(0) !important;
    }

    /* Layout */
    .md\:ml-64 { margin-left: 16rem; }
    .md\:pt-0 { padding-top: 0; }
    .md\:p-4 { padding: 1rem; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:gap-4 { gap: 1rem; }

    /* Display */
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }

    /* Flexbox */
    .md\:flex-none { flex: none; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }

    /* Sizing */
    .md\:w-12 { width: 3rem; }
    .md\:h-12 { height: 3rem; }
    .md\:w-auto { width: auto; }

    /* Grid */
    .md\:col-span-1 { grid-column: span 1 / span 1; }

    /* Typography */
    .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }

    /* Z-index */
    .md\:z-30 { z-index: 30; }

    /* Transforms */
    .md\:translate-x-0 { transform: translateX(0); }
}

/* Sidebar: pełna wysokość ekranu.
   Klasa `h-screen` z markupu nie istnieje w purged tailwind.css (jest tylko
   `min-h-screen`), więc wysokość <aside> wyznaczała treść. Skutki:
   - desktop: gradient kończył się przed dołem ekranu,
   - iPhone: dolna sekcja „Wyloguj" wychodziła poza widoczny obszar i była
     nieklikalna, a nav nie scrollował się niezależnie.
   dvh uwzględnia dynamiczny pasek adresu Safari; vh to fallback. */
aside.sidebar-desktop-visible {
    height: 100vh;   /* fallback dla przeglądarek bez dvh */
    height: 100dvh;  /* mobile: „Wyloguj" zawsze widoczny, nav scrolluje w środku */
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    /* Better touch targets on mobile */
    nav a {
        min-height: 48px;
    }

    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Line clamp utilities */
.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;
}

