/* ==========================================
   GLOBAL STYLES & MOTYW
   ========================================== */

:root {
    --app-max-width-narrow: 520px;
    --app-max-width-wide: 660px;
    /* Motyw Jasny (Domyślny) */
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted-custom: #64748b;
    --bg-card: #ffffff;
    --border-card: #e2e8f0;
    --bg-dropzone: #fafafa;
    --border-dropzone: #cbd5e1;
    --bg-dropzone-hover: #f1f5f9;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --border-navbar: #e2e8f0;
    --bg-footer: #ffffff;
    --border-footer: #e2e8f0;
    --bg-subcard: #f8fafc;
    --border-subcard: #e2e8f0;
}

[data-bs-theme="dark"] {
    /* Motyw Ciemny */
    --bg-body: #0f172a;
    --text-main: #f8fafc;
    --text-muted-custom: #94a3b8;
    --bg-card: #1e293b;
    --border-card: #334155;
    --bg-dropzone: #0f172a;
    --border-dropzone: #334155;
    --bg-dropzone-hover: #1e293b;
    --bg-navbar: rgba(15, 23, 42, 0.95);
    --border-navbar: #334155;
    --bg-footer: #1e293b;
    --border-footer: #334155;
    --bg-subcard: #0f172a;
    --border-subcard: #334155;
}

/* Przełączanie ikon w zależności od motywu */
.theme-icon-sun {
    display: none;
}

.theme-icon-moon {
    display: inline-block;
}

[data-bs-theme="dark"] .theme-icon-sun {
    display: inline-block;
}

[data-bs-theme="dark"] .theme-icon-moon {
    display: none;
}

.app-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

/* Responsywne Kontenery */
.app-container-narrow,
.app-container-wide {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.app-container-narrow {
    max-width: var(--app-max-width-narrow);
}

.app-container-wide {
    max-width: var(--app-max-width-wide);
}

/* Typografia */
.responsive-title {
    font-size: clamp(1.45rem, 5.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.responsive-subtitle {
    font-size: clamp(0.875rem, 2.8vw, 1rem);
    line-height: 1.5;
}

/* Karta Główna */
.main-card {
    border: 1px solid var(--border-card);
    border-radius: clamp(20px, 5vw, 28px);
    background: var(--bg-card);
    padding: clamp(1.25rem, 4.5vw, 2.25rem);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Sub-card dla podglądu pliku */
.sub-card {
    background-color: var(--bg-subcard);
    border: 1px solid var(--border-subcard);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* CAŁKOWITE UKRYCIE NATYWNEGO NAPISU PRZEGLĄDAJ / NIE WYBRANO PLIKU */
.dropzone-file-input,
input[type="file"].dropzone-file-input {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    font-size: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Przycisk Główny */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.4rem;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-primary-custom:hover,
    .btn-primary-custom:active {
        box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
        color: white;
    }

.min-w-0 {
    min-width: 0 !important;
}

/* Pasek Postępu */
.progress {
    border-radius: 10px;
    background-color: var(--border-card);
    overflow: hidden;
}

.progress-bar-custom {
    background: linear-gradient(90deg, #4f46e5 0%, #818cf8 100%);
}

/* Płynne przejścia stanów */
.fade-in-up {
    animation: fadeInUp 0.25s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
