/* 
================================================================
EBRA UNIFIED UI KIT (v1.0)
System projektowy dla kalkulatorów rzemieślniczych
================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Kolory bazowe EBRA */
    --ebra-bg: #0f0e0c;
    --ebra-bg-card: #161410;
    --ebra-bg-input: #1c1a16;
    --ebra-gold: #c9a227;
    --ebra-gold-light: #e8c353;
    --ebra-text-main: #f0ebe0;
    --ebra-text-dim: #a09a8e;
    --ebra-border: rgba(255, 255, 255, 0.07);
    
    /* AKCENT - to zmienisz w każdym kalkulatorze! 
       Zmienia kolor poświaty, obramowań i przycisków. */
    --ebra-accent: var(--ebra-gold); 
    --ebra-accent-glow: rgba(201, 162, 39, 0.15);
}

/* Reset i bazy */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--ebra-bg);
    color: var(--ebra-text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typografia */
h1, h2, h3, .playfair {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Layout Kalkulatora */
.ebra-app-container {
    max-width: 600px; /* Zredukowane dla efektu "mobile app" w przeglądarce */
    margin: 0 auto;
    padding: 0;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Karta główna kalkulatora */
.ebra-card {
    background: var(--ebra-bg-card);
    border: 1px solid var(--ebra-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    margin-bottom: 80px; /* Miejsce na bottom nav */
}

/* Poświata akcentowa pod kartą */
.ebra-card::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--ebra-accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ebra-card-content {
    position: relative;
    z-index: 1;
}

/* UI Komponenty - Formularz */
.ebra-group {
    margin-bottom: 1.5rem;
}

.ebra-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ebra-text-dim);
    margin-bottom: 0.5rem;
}

.ebra-input {
    width: 100%;
    background: var(--ebra-bg-input);
    border: 1px solid var(--ebra-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--ebra-text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ebra-input:focus {
    outline: none;
    border-color: var(--ebra-accent);
    box-shadow: 0 0 15px var(--ebra-accent-glow);
}

/* Przycisk Akcji */
.ebra-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--ebra-accent), var(--ebra-gold-light));
    color: #1a1000;
    border: none;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.ebra-btn.red {
    background: #c0392b;
    color: white;
}

.ebra-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--ebra-accent-glow);
    filter: brightness(1.1);
}

/* Sekcja Wyników */
.ebra-results {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border-left: 4px solid var(--ebra-accent);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ebra-border);
    padding-bottom: 0.5rem;
}

.result-val {
    font-weight: 700;
    color: var(--ebra-gold);
}

/* Nagłówek Kalkulatora */
.ebra-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ebra-logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ebra-logo-gear { color: var(--ebra-gold); font-size: 1.5rem; }
.ebra-logo-text { color: white; font-weight: 800; font-family: 'Playfair Display', serif; }

/* LISTA RECEPTUR (Zgodnie z obrazkiem) */
.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.recipe-card {
    background: var(--ebra-bg-card);
    border: 1px solid var(--ebra-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.recipe-card:hover {
    transform: translateX(5px);
    border-color: var(--ebra-accent);
    background: var(--ebra-bg-input);
}

.recipe-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: #222;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.recipe-info {
    margin-left: 1.2rem;
    flex: 1;
}

.recipe-title {
    font-weight: 700;
    color: var(--ebra-text-main);
    display: block;
    margin-bottom: 2px;
}

.recipe-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ebra-text-dim);
}

.badge-wzorzec {
    background: #f1c40f;
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 4px;
    display: inline-block;
}

/* DOLNA NAWIGACJA */
.ebra-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: #111;
    border-top: 1px solid var(--ebra-border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--ebra-text-dim);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--ebra-accent);
}

.nav-icon {
    font-size: 1.2rem;
}

/* Ukrywanie widoków dla SPA */
.view { display: none; }
.view.active { display: block; }

/* Responsive */
@media (max-width: 600px) {
    .ebra-card { border-radius: 0; border: none; }
}
