.budi-typography-table__wrapper {
    margin: 20px 0;
}

.budi-typography-table__title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-main);
}

.budi-typography-table__container {
    background: var(--bsg-color-light-gray);
    overflow-x: auto;
}

/* CSS Grid Layout */
.budi-typography-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    overflow: hidden;
    gap: 0;
    color: var(--color-main);
    text-align: center;
}

.budi-typography-table__header {
    display: contents;
}

.budi-typography-table__header-cell {
    padding: 20px 30px;
    font-weight: 600;
    font-size: 16px;
    color: inherit;
    border-bottom: 1px solid #E3E7ED;
    border-right: 1px solid #E3E7ED;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.budi-typography-table__header-cell:first-child {
    border-right: 1px dashed #E3E7ED;
}

.budi-typography-table__header-cell:last-child {
    border-right: none;
}

.budi-typography-table__row {
    display: contents;
}

.budi-typography-table__cell {
    padding: 16px;
    font-size: 14px;
    color: var(--color-main);
    border-bottom: 1px solid #E3E7ED;
    border-right: 1px solid #E3E7ED;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.budi-typography-table__cell:first-child {
    border-right: 1px dashed #E3E7ED;
}

/* Remove right border from last column */
.budi-typography-table__cell:nth-child(5n) {
    border-right: none;
}

/* Remove bottom border from last row */
.budi-typography-table__row:last-of-type .budi-typography-table__cell {
    border-bottom: none;
}

/* Hover effect for rows */
.budi-typography-table__row:hover .budi-typography-table__cell {
    background-color: #f8f9fa;
}

/* Specific column styling */
.budi-typography-table__cell--kategorie {
    color: inherit;
}

.budi-typography-table__cell--font {
    color: inherit;
    font-weight: 500;
}

.budi-typography-table__cell--schriftschnitt {
    color: inherit;
}

.budi-typography-table__cell--grosse {
    font-weight: 500;
}

.budi-typography-table__cell--spacing {
    color: inherit;
}

/* Hide data-label by default */
.budi-typography-table__cell::before {
    display: none;
}

/* Responsive Design - Tablet */
@media (max-width: 968px) {
    .budi-typography-table {
        grid-template-columns: 1.2fr 1fr 1fr 0.8fr 0.8fr;
    }
    
    .budi-typography-table__container {
        border-radius: 6px;
    }
    
    .budi-typography-table__header-cell,
    .budi-typography-table__cell {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Responsive Design - Mobile (Card Layout) */
@media (max-width: 768px) {
    .budi-typography-table {
        display: block;
        box-shadow: none;
    }
    
    .budi-typography-table__header {
        display: none;
    }
    
    .budi-typography-table__row {
        display: block;
        background: white;
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }
    
    .budi-typography-table__row:last-of-type {
        margin-bottom: 0;
    }
    
    .budi-typography-table__cell {
        display: block;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid #E3E7ED;
        position: relative;
        padding-left: 120px;
    }
    
    .budi-typography-table__cell:last-child {
        border-bottom: none;
    }
    
    /* Show labels on mobile */
    .budi-typography-table__cell::before {
        content: attr(data-label) ": ";
        display: inline-block;
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: #5f6368;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 90px;
    }
    
    /* Adjust specific cell styling for mobile */
    .budi-typography-table__cell--kategorie::before {
        color: inherit;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    
    .budi-typography-table__cell {
        padding: 10px 16px;
        padding-left: 110px;
        font-size: 12px;
    }
    
    .budi-typography-table__cell::before {
        font-size: 11px;
        min-width: 80px;
    }
    
    .budi-typography-table__title {
        font-size: 20px;
    }
}
