/* Wine Print Label Styles */

@media print {
    @page {
        size: A4;
        margin: 15mm;
    }
    body {
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    .no-print {
        display: none !important;
    }
    /* Sicherstellen, dass Hintergründe gedruckt werden */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background: white;
}

.print-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
}

.wine-header {
    text-align: center;
    border-bottom: 3px double #8B4513;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.wine-label-image {
    max-width: 200px;
    max-height: 200px;
    margin: 0 auto 20px;
    display: block;
    border: 2px solid #8B4513;
    padding: 10px;
    background: white;
    object-fit: contain;
}

.wine-title {
    font-size: 32px;
    font-weight: bold;
    color: #8B4513;
    margin: 10px 0;
}

.winery-name {
    font-size: 20px;
    color: #666;
    font-style: italic;
}

.vintage-badge {
    display: inline-block;
    background: #8B4513;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.section {
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #8B4513;
    border-bottom: 2px solid #D2691E;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.info-table td:first-child {
    font-weight: bold;
    width: 30%;
    color: #666;
}

.grape-chart {
    text-align: center;
    margin: 20px 0;
}

.grape-chart-image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 3px solid #8B4513;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
}

.grape-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.grape-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.grape-legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #333;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
}

.grape-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.grape-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #8B4513;
    font-weight: bold;
    color: #8B4513;
}

.grape-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.wine-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.wine-image-container {
    position: relative;
    border: 2px solid #8B4513;
    border-radius: 5px;
    background: #f9f9f9;
    padding: 10px;
}

.wine-image-container.selected {
    border-color: #2d5a2d;
    background: #f0f9f0;
}

.wine-image {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 5px;
}

.image-checkbox-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.image-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border: 2px solid #8B4513;
    background: white;
    border-radius: 4px;
}

.image-checkbox:checked {
    background: #2d5a2d;
    border-color: #2d5a2d;
}

.select-all-btn {
    background: #2d5a2d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
}

.select-all-btn:hover {
    background: #3d6a3d;
}

.deselect-all-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
    margin-left: 10px;
}

.deselect-all-btn:hover {
    background: #A0522D;
}

.appellation-badge {
    display: inline-block;
    background: #2d5a2d;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    margin-top: 10px;
}

.print-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

.print-button:hover {
    background: #A0522D;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #8B4513;
    color: #666;
    font-size: 12px;
}
