/* Define global brand color variables */
:root {
    --primary-color: #009846;    /* Green for header */
    --secondary-color: #E31E24;  /* Red for footer */
}

/* Main styling */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Header styling - Apply primary color */
.navbar-dark.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Footer styling - Apply secondary color */
footer.bg-light {
    background-color: var(--secondary-color) !important;
    color: white;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Card styling */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Dashboard cards */
.dashboard-card {
    border-left: 5px solid;
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-body {
    padding: 1.25rem;
}

.dashboard-card-primary {
    border-left-color: var(--primary-color);
}

.dashboard-card-success {
    border-left-color: #198754;
}

.dashboard-card-info {
    border-left-color: #0dcaf0;
}

.dashboard-card-warning {
    border-left-color: #ffc107;
}

/* Table styling */
.table th {
    background-color: #f8f9fa;
}

/* Form styling */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #008139;
    border-color: #007533;
}

/* Item image thumbnails */
.item-image-thumbnail {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.item-image-preview {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Action buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Logo styling for page titles */
.page-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.page-logo img {
    max-height: 50px;
    max-width: 100px;
    object-fit: contain;
}

/* Ensure consistent spacing in title area */
.d-flex.align-items-center.mb-4 {
    margin-left: 1rem;
}

/* Print-only styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

.print-only {
    display: none;
}

/* Diagramm-Container Stile */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
}

/* Hover-Effekt für Diagramme */
.card:hover .chart-container canvas {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Legende Stile */
.chart-legend {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

/* Custom Styles für Cluster */
.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.6);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.6);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.6);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster span {
    color: #ffffff;
}

.same-height {
    height: 500px; /* Gesamthöhe für die Karte */
}

.same-height .card-body {
    height: calc(100% - 50px); /* Abzüglich Header-Höhe */
    padding: 15px;
}

.same-height .card-body canvas {
    height: 100% !important;
    width: 100% !important;
}

.same-height .card-body #sellerMap {
    height: 100% !important;
    width: 100%;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
}