/* Base Table Styles - Responsive */
.widget-div-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, var(--color-brand-primary-rgba-08) 0%, var(--color-brand-secondary-rgba-08) 100%);
}

/* Table Wrapper for Horizontal Scroll on Mobile */
.widget-div-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.widget-div-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.widget-div-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.widget-div-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(28, 119, 166, 0.3);
    border-radius: 4px;
}

.widget-div-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(28, 119, 166, 0.5);
}

.widget-div-table-header {
    display: table-header-group;
}

.widget-div-table-header-row {
    display: table-row;
}

.widget-div-table-header-cell {
    display: table-cell;
    padding: 12px 16px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-family-primary);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--font-size-base);
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    color: var(--color-background-primary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.widget-div-table-header-cell:last-child {
    border-right: none;
}

.widget-div-table-body {
    display: table-row-group;
}

.widget-div-table-body-row {
    display: table-row;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, var(--color-brand-primary-rgba-06) 0%, var(--color-brand-secondary-rgba-06) 100%);
}

.widget-div-table-body-row:hover {
    background: linear-gradient(135deg, var(--color-brand-primary-rgba-1) 0%, var(--color-brand-secondary-rgba-1) 100%);
}

.widget-div-table-body-cell {
    display: table-cell;
    padding: 12px 16px;
    vertical-align: top;
    font-family: var(--font-family-primary);
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-background-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.widget-div-table-body-cell:last-child {
    border-right: none;
}

/* Preis-Spalte: Euro-Zeichen darf nicht umbrechen */
.widget-div-table-body-cell:last-child,
.widget-div-table-header-cell:last-child {
    white-space: nowrap;
}

/* Mobile Optimization - Stack Layout for Small Screens */
@media (max-width: 767px) {
    .widget-div-table-wrapper {
        margin: 16px 0;
    }
    
    .widget-div-table {
        display: block;
        width: 100%;
        min-width: 600px; /* Minimum width for horizontal scroll */
    }
    
    .widget-div-table-header {
        display: none; /* Hide header on mobile, will show in cells */
    }
    
    .widget-div-table-body {
        display: block;
    }
    
    .widget-div-table-body-row {
        display: block;
        margin-bottom: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 12px;
        background: linear-gradient(135deg, var(--color-brand-primary-rgba-08) 0%, var(--color-brand-secondary-rgba-08) 100%);
    }
    
    .widget-div-table-body-cell {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left !important;
        color: var(--color-background-primary);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .widget-div-table-body-cell:last-child {
        border-bottom: none;
        white-space: nowrap;
    }
    
    .widget-div-table-body-cell::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: var(--color-background-primary);
        font-size: 0.9em;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .widget-div-table-header-cell {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .widget-div-table-body-cell {
        padding: 10px 12px;
        font-size: 0.95em;
        color: var(--color-background-primary);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
}

/* Small Mobile - Enhanced Stack Layout */
@media (max-width: 575px) {
    .widget-div-table-wrapper {
        margin: 12px 0;
    }
    
    .widget-div-table {
        min-width: 500px;
    }
    
    .widget-div-table-body-row {
        margin-bottom: 16px;
        padding: 10px;
        border-radius: 6px;
    }
    
    .widget-div-table-body-cell {
        padding: 8px 0;
        font-size: 0.9em;
        color: var(--color-background-primary);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .widget-div-table-body-cell::before {
        font-size: 0.85em;
        margin-bottom: 3px;
        color: var(--color-background-primary);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
    .widget-div-table {
        min-width: 450px;
    }
    
    .widget-div-table-body-row {
        padding: 8px;
    }
    
    .widget-div-table-body-cell {
        padding: 6px 0;
        font-size: 0.85em;
        color: var(--color-background-primary);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
}
