.byggopp-empty {
    text-align: center;
    font-size: 21px;
}

/* Wrapper */
.byggopp-container {
    border: 1px solid #ECE2D2;
    border-radius: 10px;
    background: #fcfcfc;
}

/* Top bar: search + filters */
.byggopp-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    gap: 30px;
}

/* Search */
.byggopp-header .search {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.byggopp-header .search .icon {
    font-size: 16px;
    opacity: 0.8;
    color: #d9631e;
    width: 35px;
    height: 35px;
}

.byggopp-header .search .icon:before {
    width: 35px;
    height: 35px;
    font-size: 35px;
}

.byggopp-header .search input {
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    min-width: 300px;
}

.byggopp-header .search input:focus {
    background: transparent;
}

.byggopp-header .actions {
    display: flex;
    gap: 20px;
}

.byggopp-header .actions label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
}

/* Checkbox */
.byggopp-header .actions input[type="checkbox"] {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    border: 1px solid #e3c59d;
    accent-color: #d9631e;
    margin: 0;
    cursor: pointer;
}

/* CTA button */
.byggopp-header .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-radius: 999px;
    background: #d9631e;
    color: #ffffff;
    text-decoration: none;
    border: none;
    gap: 5px;
}

/* Column header */
.byggopp-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr 40px;
    gap: 8px;
    background: #ECE2D2;
    padding: 20px;
    font-weight: 600;
}

/* Rows */
.byggopp-row {
    border-bottom: 1px solid #ECE2D2;
    font-size: 14px;
    transition: background-color 0.4s ease;
}

.byggopp-row:has(.byggopp-row-header.is-open) {
    background-color: #f3f3f3;
}

.byggopp-row-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr 40px;
    gap: 8px;
    align-items: center;
    padding: 20px;
    cursor: pointer;
}

.byggopp-row-header.is-open {
    font-weight: 600;
}

.byggopp-row-header .available span {
    display: none;
}

.byggopp-row:last-of-type {
    border-radius: 0 0 8px 8px;
}

/* Expand button */
.byggopp-row .expand {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px;
}

.byggopp-row .expand .icon:before {
    color: #d9631e
}

/* Details area */
.byggopp-row .details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.byggopp-row .details-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr 40px;
    gap: 15px;
    padding: 20px;
}

.byggopp-row .details-inner .title {
    font-weight: 600;
}

.byggopp-row .details-inner .subjects {
    display: grid;
    gap: 15px;
    align-content: start;
}

.byggopp-row .details-inner .email {
    word-break: break-all;
}

.byggopp-row .details-inner .visit .icon {
    text-decoration: none;
}

.byggopp-row-header.is-open .expand .dashicons {
    transform: rotate(180deg);
}

.byggopp-row-header .expand .dashicons {
    transition: transform 0.4s ease;
}

/* Responsive */
@media (max-width: 1210px) {
    .byggopp-header {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .byggopp-header .search {
        padding: 20px 15px;
    }

    .byggopp-header .search.seperator {
        border-bottom: 1px solid #ECE2D2;
    }

    .byggopp-header .search input {
        min-width: 0;
        width: 100%;
    }

    .byggopp-header .actions {
        padding: 20px;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 1110px) {
    .byggopp-container {
        background: none;
        border: none;
        display: grid;
        gap: 20px;
    }

    .byggopp-header {
        border: 1px solid #ECE2D2;
        border-radius: 10px;
        background: #fcfcfc;
    }

    .byggopp-table-header {
        display: none;
    }

    .byggopp-row-header {
        grid-template-columns: minmax(0, 1fr) auto 40px;
        ;
        grid-template-areas:
            'city available expand'
            'company available expand'
            'subject available expand';
        row-gap: 0;
    }

    .byggopp-row-header .company {
        grid-area: company;
        font-weight: 600;
    }

    .byggopp-row-header .available {
        grid-area: available;
        background-color: #d9631e;
        color: #ffffff;
        min-width: 120px;
        text-align: center;
        padding: 8px 24px;
        border-radius: 999px;
    }

    .byggopp-row-header .city {
        grid-area: city;
    }

    .byggopp-row-header .subject {
        grid-area: subject;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .byggopp-row .expand {
        grid-area: expand;
    }

    .byggopp-row-header .available span {
        display: inline;
    }

    .byggopp-row-header.is-open>div:not(.company) {
        font-weight: 400;
    }

    .byggopp-row {
        border: 1px solid #ECE2D2;
        border-radius: 10px !important;
        background: #fcfcfc;
    }

    .byggopp-row .details-inner {
        display: grid;
        grid-template-columns: repeat(5, max-content);
        gap: 15px;
        justify-content: space-between;
        padding: 20px;
    }
}

@media (max-width: 875px) {
    .byggopp-row .details-inner {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 450px) {
    .byggopp-header .actions {
        flex-direction: column;
    }

    .byggopp-row-header {
        grid-template-columns: 1fr 40px;
        grid-template-areas:
            'city expand'
            'company expand'
            'subject expand'
            'available expand'
    }

    .byggopp-row-header .available {
        grid-template-columns: 1fr 40px;
        max-width: 120px;
        margin-top: 20px;
    }
}