
.map-wrapper { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 15px; 
    width: 100%; 
    max-width: 1000px; /* Limits width on huge screens */
    margin: 0 auto; 
    padding: 10px;
    box-sizing: border-box;
}

#map { 
    height: 400px; /* Reduced height slightly for better mobile scrolling */
    width: 100%;   /* Full width by default */
    border-radius: 10px; 
    border: 1px solid #ccc; 
    background: #f8f9fa; 
}

/* Desktop adjustment: If the screen is wide, make the map a bit smaller if desired */
@media (min-width: 768px) {
    #map { height: 400px; width: 50%; }
}

#status { 
    font-family: sans-serif; 
    font-size: 14px; 
    color: #333; 
    font-weight: 600; 
    text-align: center;
    min-height: 20px; 
}
/* Shared card base for consistent section styling */
.card,
.plant-card,
.results-card,
.table-card {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 20px auto;
}

/* Use overflow helper only for horizontally scrollable cards */
.card--overflow,
.plant-card,
.results-card {
    overflow-x: auto;
}

.card--wide {
    max-width: 2160px;
}

#pflanze {
    color: #2d5a27; /* Natur-Grün */
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Shared base table styling */
.table-base,
.vertical-table,
.horizontal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.table-base--collapsed,
.horizontal-table--collapsed {
    border-collapse: collapse;
}

.table-base th,
.vertical-table th,
.horizontal-table th {
    background-color: #f8fbf8;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #eee;
}

.table-base td,
.vertical-table td,
.horizontal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

/* For vertical tables, we want the header to be on the left and the data on the right. The first column should be bold*/
.vertical-table td:first-child {
    font-weight: 600;
    background-color: #f8fbf8;
    color: #333;
    border-right: 2px solid #eee;
}
.vertical-table td:not(:first-child) {
    background-color: #fff;
    color: #555;
}



/* Table alignment utilities */
.text-center,
.table-base th.text-center {
    text-align: center;
}

/* Zebra-Look und Hover-Effekt */
.table-base tbody tr:nth-child(even),
.vertical-table tr:nth-child(even),
.horizontal-table tr:nth-child(even) {
    background-color: #fafafa;
}

.table-base tbody tr:hover,
.vertical-table tr:hover,
.horizontal-table tr:hover {
    background-color: #f0f7ef;
    transition: background-color 0.2s ease;
}

/* Utility classes for text and content */
.coords-font {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 0.9em;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Button utilities */
.btn {
    border: none;
    padding: 10px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-spacing {
    margin-left: 5px;
}

/* Input utilities */
.table-input {
    width: 90%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Cell utilities */
.cell-coords {
    font-family: monospace;
    font-size: 12px;
}

.cell-action {
    text-align: center;
}

/* Result table special styling */
.result-table {
    width: 100%;
    overflow: hidden; /* Required to clip the column highlight */
    position: relative;
    border-collapse: collapse;
}

.result-table .standort-header {
    background-color: #000066;
    color: white;
    font-weight: bold;
    padding: 15px;
    border: 1px solid #ddd;
}

.result-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    position: relative; /* Anchor for progress bar AND column highlight */
    z-index: 0;
    cursor: default;
}

/* 2. The ROW Highlight */
.result-table tbody tr:hover {
    background-color: #f0f7ef; /* Light green for the whole row */
}

/* 3. The COLUMN Highlight (The "Crosshair" Trick) */
.result-table td:hover::after {
    content: "";
    position: absolute;
    background-color: rgba(0, 0, 0, 0.05); /* Very subtle tint for the column */
    left: 0;
    right: 0;
    top: -5000px;   /* Huge height to cover all rows above */
    bottom: -5000px; /* Huge height to cover all rows below */
    z-index: -2;    /* Stays behind the progress bar and text */
    pointer-events: none;
}

/* 4. The CELL Highlight (The intersection) */
.result-table td:hover {
    background-color: #e2f0e1; /* Slightly darker green for the active cell */
}

/* 5. Progress Bar - Standardize layout */
.result-table td .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(180, 0, 0, 0.8);
    width: var(--progress);
    z-index: -1; /* Behind the text */
    pointer-events: none;
}

/* 6. Clean Text (No link effect) */
.result-table td .cell-text {
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: #333;
    cursor: pointer; /* Indicate interactivity */
    text-decoration: underline;
}
/* 6. Clean Text (No link effect) */
.result-table td .cell-text:hover {
    text-decoration: none;
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.table-card {
    overflow: hidden;
}
.table-card img {
    display: block;
    margin: 20px auto;
    max-width: 80%;
    height: auto;
}
.centered-text {
    display: block;
    text-align: center;
    font-size: 1.1em;
    color: #333;
}
.date-input-container {
    display: flex;
    justify-content: center;
}
.date-input-container input[type="date"] {
    text-align: center;
    padding: 1px;
    border: 2px solid #ccc;
    border-radius: 3px;
}
.wp-grid-table-container {
    margin: 20px 0;
    width: 100%;
}
#plant-grid-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Erzwingt gleich breite Spalten */
}
#plant-grid-table td {
    padding: 12px;
    border: 1px solid #eee;
    cursor: pointer;
    text-align: center;
    font-family: sans-serif;
}
/* Hover-Effekt */
#plant-grid-table td:hover {
    background-color: #f0f9eb;
    color: #2e7d32;
    font-weight: bold;
}
/* Responsive: Auf sehr kleinen Handys nur 1 Spalte */
@media (max-width: 480px) {
    #plant-grid-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}