/* Verbesserte Stildatei mit allen Korrekturen */

/* Container schmaler und mit weißem Schatten - verstärkt */
.recipe-calculator-container {
    width: 100% !important;
    max-width: 550px !important;
    margin: 20px auto !important;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.95), 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    padding: 20px !important;
    background-color: #fdfdfd !important;
}

/* Kleineres Bild mit stärkeren abgerundeten Ecken */
.recipe-image {
    max-width: 80% !important;
    margin: 0 auto 20px !important;
}

.recipe-image img {
    border-radius: 15px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Komplett neu gestaltete Portionsanzeige */
.recipe-servings-control {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 20px auto !important;
    max-width: 280px !important;
    background-color: #f5f5f5 !important;
    border-radius: 30px !important;
    padding: 8px 10px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.servings-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background-color: #0f1729 !important; /* Dunkelblau wie gewünscht */
    border: none !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    color: #fff !important; /* Weiße Schrift wie gewünscht */
    transition: all 0.2s !important;
    text-align: center !important;
    padding: 0 !important;
}

.servings-button:hover {
    background-color: #1a2540 !important; /* Leicht hellerer Hover-Zustand */
}

.servings-info {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 15px !important;
    flex-grow: 1 !important;
    text-align: center !important;
}

.servings-display {
    font-size: 22px !important;
    font-weight: bold !important;
    color: #000 !important;
    margin: 0 6px !important;
}

.servings-label {
    color: #000 !important;
    font-weight: 500 !important;
    font-size: 16px !important;
}

/* Button-Positionierung: PDF-Button links, Druck-Button rechts */
.recipe-actions {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 20px !important;
    width: 100% !important;
    gap: 15px !important; /* Expliziter Abstand zwischen Buttons */
}

.recipe-actions .print-recipe-button {
    background-color: #0f1729 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 8px 15px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: background-color 0.2s !important;
}

.recipe-actions .print-recipe-button:hover {
    background-color: #1a2540 !important;
}

/* Sicherstellen, dass das Responsive Design für Buttons funktioniert */
@media only screen and (max-width: 767px) {
    .recipe-servings-control {
        padding: 8px 6px !important;
    }
    
    .servings-button {
        margin: 0 5px !important;
    }
    
    .servings-info {
        margin: 0 10px !important;
    }
    
    /* Buttons untereinander anordnen */
    .recipe-actions {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    .recipe-button.pdf-button,
    .recipe-button.print-button {
        width: 100% !important;
        max-width: 200px !important;
        text-align: center !important;
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
}

/* Zutatenliste mit deutlich sichtbaren abgerundeten Ecken */
.ingredients-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Wechselnde Zeilenfarben, erste Zeile dunkelblau mit weißer Schrift */
.ingredients-table tr:nth-child(odd) {
    background-color: #0f1729 !important; /* Dunkelblau wie gewünscht */
}

.ingredients-table tr:nth-child(odd) td {
    color: #fff !important; /* Weiße Schrift für die erste Zeile */
}

.ingredients-table tr:nth-child(even) {
    background-color: #f0f2f5 !important; /* Hellerer Hintergrund für die zweite Zeile */
}

.ingredients-table tr:nth-child(even) td {
    color: #000 !important; /* Schwarze Schrift für die zweite Zeile */
}

.ingredients-table tr:first-child td {
    border-top: 1px solid #0f1729 !important;
}

.ingredients-table tr:first-child td:first-child {
    border-top-left-radius: 10px !important;
}

.ingredients-table tr:first-child td:last-child {
    border-top-right-radius: 10px !important;
}

.ingredients-table tr:last-child td:first-child {
    border-bottom-left-radius: 10px !important;
}

.ingredients-table tr:last-child td:last-child {
    border-bottom-right-radius: 10px !important;
}

.ingredients-table td {
    padding: 12px 15px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-left: 1px solid #e0e0e0 !important;
    white-space: nowrap !important; /* Verhindert Zeilenumbrüche innerhalb der Zellen */
}

.ingredients-table td:last-child {
    border-right: 1px solid #e0e0e0 !important;
}

/* PDF-Vorschau-Styles */
.pdf-preview-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.pdf-preview-container {
    background-color: white !important;
    border-radius: 10px !important;
    width: 80% !important;
    max-width: 800px !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
}

.pdf-preview-header {
    padding: 15px 20px !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    justify-content: space-between !important;
}

.pdf-preview-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #0f1729 !important;
}

.pdf-preview-content {
    padding: 30px !important;
    overflow-y: auto !important;
    max-height: 60vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background-color: #f5f5f5 !important; /* Hintergrundfarbe für besseren Kontrast */
}

.pdf-preview-content canvas {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    max-width: 90% !important; /* Von 75% auf 90% erhöht */
    height: auto !important;
    border-radius: 5px !important;
}

/* PDF-Dialog-Aktionen auf allen Geräten untereinander */
.pdf-preview-actions {
    padding: 15px 20px !important;
    border-top: 1px solid #eee !important;
    display: flex !important;
    flex-direction: column !important; /* Immer untereinander */
    align-items: center !important;
    gap: 10px !important;
}

.pdf-download-button, 
.pdf-cancel-button {
    padding: 8px 15px !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border: none !important;
    font-weight: 500 !important;
    width: 100% !important;
    max-width: 200px !important;
    text-align: center !important;
}

.pdf-download-button {
    background-color: #0f1729 !important;
    color: white !important;
}

.pdf-cancel-button {
    background-color: #f0f2f5 !important;
    color: #333 !important;
}

.pdf-download-button:hover {
    background-color: #1a2540 !important;
}

.pdf-cancel-button:hover {
    background-color: #e0e2e5 !important;
}

/* Bessere Lesbarkeit für Zahlen mit Dezimalpunkten */
.ingredient-amount {
    letter-spacing: 0.05em !important; /* Mehr Abstand zwischen Buchstaben/Zahlen */
    font-feature-settings: "tnum" !important; /* Monospaced Zahlen für bessere Ausrichtung */
}

/* Ladeindikator für PDF-Vorschau */
.pdf-loading {
    padding: 20px !important;
    text-align: center !important;
    font-size: 16px !important;
    color: #666 !important;
    font-style: italic !important;
    animation: pulse 1.5s infinite !important;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Fehlermeldungsstil hinzufügen */
.pdf-error {
    padding: 20px !important;
    text-align: center !important;
    color: #d32f2f !important;
    font-weight: bold !important;
} 