/**
 * Therm Preistabellen Frontend Styles - Modern Apple Style
 */

:root {
    --therm-accent-gradient: linear-gradient(90deg, rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    --therm-accent-start: rgba(8, 162, 87, 1);
    --therm-accent-end: rgba(0, 66, 106, 1);
    --therm-light-bg: #f8f8f8;
    --therm-border-radius: 12px;
    --therm-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --therm-transition: all 0.3s ease;
    --therm-font-family: 'Montserrat', sans-serif;
}

/* Montserrat Schriftart einbinden */

/* Container */
.therm-preistabellen-container {
    margin-bottom: 3em;
    font-family: var(--therm-font-family);
}

.therm-preistabellen-title {
    margin-bottom: 1.2em;
    font-size: 2em;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #333;
    font-family: var(--therm-font-family);
}

/* Tabs */
.therm-preistabellen-tabs {
    margin-bottom: 2em;
    position: relative;
}

.therm-preistabellen-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
    gap: 0.5em;
    font-family: var(--therm-font-family);
}

.therm-preistabellen-tab {
    margin: 0;
}

.therm-preistabellen-tab a {
    display: block;
    padding: 0.8em 1.5em;
    text-decoration: none;
    border: none;
    border-radius: var(--therm-border-radius);
    transition: var(--therm-transition);
    color: #333;
    font-weight: 500;
    background-color: #f1f1f1;
    font-family: var(--therm-font-family);
}

.therm-preistabellen-tab a:hover,
.therm-preistabellen-tab a:focus {
    background: var(--therm-accent-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--therm-box-shadow);
}

.therm-preistabellen-tab.active a {
    background: var(--therm-accent-gradient);
    color: white;
    font-weight: 500;
    box-shadow: var(--therm-box-shadow);
}

/* Tabelle */
.therm-preistabellen-wrapper {
    overflow-x: auto;
    border-radius: var(--therm-border-radius);
    box-shadow: var(--therm-box-shadow);
    background-color: white;
}

.therm-preistabellen-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    overflow: hidden;
    font-family: var(--therm-font-family);
}

.therm-preistabellen-table th,
.therm-preistabellen-table td {
    padding: 1.2em 1.5em;
    border: none;
    text-align: left;
    vertical-align: middle;
    font-family: var(--therm-font-family);
}

.therm-preistabellen-table th {
    background-color: var(--therm-light-bg);
    font-weight: 600;
    color: #333;
    letter-spacing: -0.01em;
    position: relative;
}

.therm-preistabellen-table th:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--therm-accent-gradient);
    opacity: 0.3;
}

.therm-preistabellen-table tr {
    transition: var(--therm-transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.therm-preistabellen-table tr:last-child {
    border-bottom: none;
}

.therm-preistabellen-table tr:hover {
    background-color: rgba(8, 162, 87, 0.03);
}

/* Spaltenbreiten */
.therm-preistabellen-leistung {
    width: 30%;
    font-weight: 500;
}

.therm-preistabellen-preis,
.therm-preistabellen-preis-netto,
.therm-preistabellen-preis-brutto {
    width: 15%;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.therm-preistabellen-beschreibung {
    width: 40%;
    color: #666;
    font-size: 0.95em;
}

/* Fehlermeldungen */
.therm-preistabellen-error {
    color: #d63638;
    padding: 1.5em;
    border: none;
    background-color: #fcf0f1;
    border-radius: var(--therm-border-radius);
    box-shadow: var(--therm-box-shadow);
    font-family: var(--therm-font-family);
}

/* Hinweis unter der Tabelle */
.therm-preistabellen-hinweis {
    margin-top: 1.5em;
    padding: 1em 1.5em;
    background-color: rgba(8, 162, 87, 0.05);
    border-left: 4px solid var(--therm-accent-start);
    border-radius: 0 var(--therm-border-radius) var(--therm-border-radius) 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}

.therm-preistabellen-hinweis strong {
    color: #333;
    font-weight: 600;
}

.therm-preistabellen-hinweis em {
    font-style: italic;
}

/* Optimiertes Responsive Design für klassische Tabellenstruktur */
@media (max-width: 768px) {
    /* Container-Anpassungen */
    .therm-preistabellen-container {
        padding: 0 0.5rem;
        width: 100%;
    }
    
    .therm-preistabellen-title {
        font-size: 1.6em;
        margin-bottom: 1em;
        text-align: center;
    }
    
    /* Wrapper für Tabelle */
    .therm-preistabellen-wrapper {
        border-radius: var(--therm-border-radius);
        box-shadow: var(--therm-box-shadow);
        background-color: white;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0;
    }
    
    /* Tabelle bleibt eine Tabelle */
    .therm-preistabellen-table {
        min-width: 100%;
        width: auto;
        border-collapse: collapse;
        table-layout: auto;
    }
    
    /* Tabellenkopf */
    .therm-preistabellen-table thead {
        display: table-header-group;
    }
    
    .therm-preistabellen-table thead th {
        padding: 0.8em;
        font-size: 0.9em;
        white-space: nowrap;
        position: sticky;
        top: 0;
        background-color: var(--therm-light-bg);
        z-index: 1;
    }
    
    /* Tabellenzeilen */
    .therm-preistabellen-table tbody {
        display: table-row-group;
    }
    
    .therm-preistabellen-table tr {
        display: table-row;
    }
    
    .therm-preistabellen-table td {
        display: table-cell;
        padding: 0.8em;
        font-size: 0.9em;
        white-space: normal;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* Spaltenbreiten für mobile Ansicht */
    .therm-preistabellen-table .therm-preistabellen-leistung {
        min-width: 120px;
        white-space: normal;
    }
    
    .therm-preistabellen-table .therm-preistabellen-preis,
    .therm-preistabellen-table .therm-preistabellen-preis-netto,
    .therm-preistabellen-table .therm-preistabellen-preis-brutto {
        min-width: 80px;
        text-align: right;
        white-space: nowrap;
    }
    
    .therm-preistabellen-table .therm-preistabellen-beschreibung {
        min-width: 150px;
        white-space: normal;
    }
    
    /* Hinweis für mobile Ansicht */
    .therm-preistabellen-hinweis {
        margin-top: 1em;
        padding: 0.8em 1em;
        font-size: 0.85em;
        border-left-width: 3px;
    }
    
    /* Tabs für mobile Ansicht */
    .therm-preistabellen-tabs {
        margin-bottom: 1.5em;
    }
    
    .therm-preistabellen-tabs-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5em;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        margin: 0 -0.5rem;
        padding: 0 0.5rem 0.5em;
    }
    
    .therm-preistabellen-tabs-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .therm-preistabellen-tab {
        flex: 0 0 auto;
    }
    
    .therm-preistabellen-tab a {
        padding: 0.7em 1.2em;
        font-size: 0.9em;
        white-space: nowrap;
    }
    
    /* Für sehr kleine Bildschirme */
    @media (max-width: 480px) {
        .therm-preistabellen-table th,
        .therm-preistabellen-table td {
            padding: 0.6em;
            font-size: 0.85em;
        }
        
        .therm-preistabellen-title {
            font-size: 1.4em;
        }
        
        .therm-preistabellen-hinweis {
            padding: 0.7em 0.9em;
            font-size: 0.8em;
        }
    }
} 