/**
 * WP Kucharka - Recipe Card Stylesheet
 */

.wp-kucharka-block-card {
    border: 1px solid var(--wp-kucharka-border, #e2e8f0);
    margin: 30px auto;
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.6;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Base moderný štýl s tieňom */
.wp-kucharka-block-card.style-base {
    border-radius: 12px;
}
.wp-kucharka-block-card.style-base.has-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Classic ostrejší štýl */
.wp-kucharka-block-card.style-classic {
    border-radius: 2px;
}
.wp-kucharka-block-card.style-classic.has-shadow {
    box-shadow: none;
}

/* Hlavička */
.wp-k-header {
    border-bottom: 2px solid var(--wp-kucharka-border, #e2e8f0);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.wp-k-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.wp-k-recipe-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.wp-k-actions {
    display: flex;
    gap: 10px;
}

.wp-k-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wp-k-btn-print {
    color: #fff;
}

.wp-k-btn-cook-mode {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1 !important;
}

.wp-k-btn-cook-mode.active-cook {
    background: #22c55e !important;
    color: #ffffff !important;
    border-color: #22c55e !important;
}

.wp-k-author-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin: 5px 0 15px 0;
}

.wp-k-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 15px;
}

/* Kapsule (Pills) */
.wp-k-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wp-k-pill-badge {
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Ovládanie porcií vo vnútri pill boxu */
.wp-k-pill-servings {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.wp-k-servings-controls {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 2px 4px;
}

.wp-k-servings-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 10px;
    color: inherit;
    transition: opacity 0.2s;
}

.wp-k-servings-btn:hover {
    opacity: 0.7;
}

.wp-k-servings-display {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Suroviny (Ingrediencie) */
.wp-k-section-ingredients {
    margin-bottom: 30px;
}

.wp-k-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wp-k-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-k-ingredient-group-title {
    margin-top: 20px;
    margin-bottom: 10px;
}

.wp-k-ingredient-group-title h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    border-bottom: 1px dashed var(--wp-kucharka-border, #e2e8f0);
    padding-bottom: 5px;
}

.wp-k-ingredient-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.wp-k-ingredient-checkbox {
    display: none;
}

.wp-k-ingredient-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

/* Vlastný checkbox */
.wp-k-ingredient-label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin-right: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

.wp-k-ingredient-checkbox:checked + .wp-k-ingredient-label {
    text-decoration: line-through;
    opacity: 0.5;
}

.wp-k-ingredient-checkbox:checked + .wp-k-ingredient-label::before {
    content: '✓';
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    line-height: 14px;
}

.wp-k-ing-qty {
    font-weight: 700;
    margin-right: 4px;
}

.wp-k-ing-unit {
    margin-right: 8px;
    color: #64748b;
}

/* Postup prípravy */
.wp-k-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wp-k-step-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

@media (min-width: 600px) {
    .wp-k-step-item {
        grid-template-columns: 3fr 1fr;
    }
}

.wp-k-step-content-box {
    display: flex;
    gap: 15px;
}

.wp-k-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #334155;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wp-k-step-image img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 140px;
}

/* Poznámky */
.wp-k-notes-section {
    background-color: rgba(0, 0, 0, 0.02);
    border-left: 4px solid var(--wk-accent, #0f7faf);
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 4px 4px 0;
}

.wp-k-notes-title {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.wp-k-notes-content {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
}

/* CSS EDITOR ŠTÝLY PRE ADMIN (GUTENBERG) */
.wp-kucharka-editor-card {
    background: #fdfdfd;
    border: 2px dashed #cbd5e1;
    padding: 30px;
    margin: 20px 0;
    border-radius: 8px;
}

.wp-k-editor-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.wp-k-editor-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.wp-k-editor-ing-row,
.wp-k-editor-step-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-k-ing-triple-fields {
    display: flex;
    gap: 8px;
    flex-grow: 1;
}

.wp-k-ing-qty-field { width: 70px; }
.wp-k-ing-unit-field { width: 80px; }
.wp-k-ing-name-field { flex-grow: 1; }

.wp-k-step-editor-body {
    flex-grow: 1;
}

.wp-k-step-indicator {
    background: #334155;
    color: #fff;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* PRISPÔSOBENIE PRE TLAČ (PRINT LAYOUT) */
@media print {
    body * {
        visibility: hidden;
    }
    .wp-kucharka-block-card,
    .wp-kucharka-block-card * {
        visibility: visible;
    }
    .wp-kucharka-block-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .wp-k-actions {
        display: none !important;
    }
    .wp-k-ingredient-checkbox {
        display: none !important;
    }
    .wp-k-ingredient-label::before {
        display: none !important;
    }
}