/**
 * Frontend styles for AAWP to WooCommerce Sync.
 * Same rules are also printed inline via wp_head, because some block themes/cache setups do not load this file reliably.
 */

/* AAWP/WooCommerce product title clamp */
h2.wp-block-post-title.product-title-clamp,
.wp-block-post-title.product-title-clamp,
.product-title-clamp {
    line-height: 1.25 !important;
    height: 2.5em !important;
    min-height: 2.5em !important;
    max-height: 2.5em !important;
    overflow: hidden !important;
}

h2.wp-block-post-title.product-title-clamp > a,
.wp-block-post-title.product-title-clamp > a,
.product-title-clamp > a,
.product-title-clamp a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    max-height: 2.5em !important;
}

/* German product details block */
.aawp-german-product-details {
    box-sizing: border-box;
    width: 100%;
}

.aawp-german-product-details__section {
    margin: 0 0 1.5rem 0;
}

.aawp-german-product-details__title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.aawp-german-product-details__content > :first-child {
    margin-top: 0;
}

.aawp-german-product-details__content > :last-child {
    margin-bottom: 0;
}

.aawp-german-product-details__table {
    width: 100%;
    border-collapse: collapse;
}

.aawp-german-product-details__label,
.aawp-german-product-details__value {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0,0,0,.12);
    vertical-align: top;
    text-align: left;
}

.aawp-german-product-details__label {
    width: 35%;
    padding-right: 1rem;
    font-weight: 700;
}

@media (max-width: 600px) {
    .aawp-german-product-details__table,
    .aawp-german-product-details__table tbody,
    .aawp-german-product-details__row,
    .aawp-german-product-details__label,
    .aawp-german-product-details__value {
        display: block;
        width: 100%;
    }

    .aawp-german-product-details__label {
        padding-bottom: 0.2rem;
        border-bottom: 0;
    }

    .aawp-german-product-details__value {
        padding-top: 0;
    }
}
