/* -------------------------------- 

File#: _1_table
Title: Table
Descr: Data tables used to organize and display information in rows and columns
Usage: codyhouse.co/license

-------------------------------- */
.table {
    position: relative;
    z-index: 1;
}

.table:not(.table--expanded) {
    border-collapse: separate;
    border-spacing: 0 var(--space-md);
    margin-top: calc(-2 * var(--space-md));
}

.table:not(.table--expanded) .table__header {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
}

.table:not(.table--expanded) .table__row .table__cell:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.table:not(.table--expanded) .table__row .table__cell:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.table:not(.table--expanded) .table__row .table__cell:last-child::after {
    display: none;
}

.table:not(.table--expanded) .table__cell {
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: right;
    padding: var(--space-md);
    background-color: var(--color-bg-light);
}

.table:not(.table--expanded) .table__cell::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    width: calc(100% - 2 * var(--space-md));
    height: 1px;
    background-color: var(--color-contrast-lower);
}

.table:not(.table--expanded) .table__label {
    font-weight: bold;
    text-align: left;
    color: var(--color-contrast-higher);
    margin-right: var(--space-md);
}

.table--expanded {
    border-bottom: 1px solid var(--color-contrast-lower);
}

.table--expanded .table__header .table__cell {
    position: relative;
    z-index: 10;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-contrast-lower);
    font-weight: bold;
    color: var(--color-contrast-higher);
}

.table--expanded .table__body .table__row:nth-child(odd) {
    background-color: hsla(var(--color-bg-dark-h), var(--color-bg-dark-s), var(--color-bg-dark-l), 0.85);
}

.table--expanded .table__cell {
    padding: var(--space-xxs);
}

.table--expanded .table__label {
    display: none;
}

.table--expanded .table__header--sticky .table__cell {
    position: sticky;
    top: 0;
}

.table {
    
}

.table--loaded {
    opacity: 1;
}

[class*=table--expanded]::before {
    display: none;
}

.table--expanded\@xs::before {
    content: "collapsed";
}

@media (min-width: 32rem) {
    .table--expanded\@xs::before {
        content: "expanded";
    }
}

.table--expanded\@sm::before {
    content: "collapsed";
}

@media (min-width: 48rem) {
    .table--expanded\@sm::before {
        content: "expanded";
    }
}

.table--expanded\@md::before {
    content: "collapsed";
}

@media (min-width: 64rem) {
    .table--expanded\@md::before {
        content: "expanded";
    }
}

.table--expanded\@lg::before {
    content: "collapsed";
}

@media (min-width: 80rem) {
    .table--expanded\@lg::before {
        content: "expanded";
    }
}

.table--expanded\@xl::before {
    content: "collapsed";
}

@media (min-width: 90rem) {
    .table--expanded\@xl::before {
        content: "expanded";
    }
}


/* Каждый 4-й элемент начиная с 3-го */
.table--expanded .table__body-vakantnye .table__cell:nth-child(4n+2) {
  border-right: var(--border-width, 1px) var(--border-style, solid) hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), var(--border-o, 1));
}

/* Убираем border-right у последнего элемента в строке */
.table--expanded .table__body-vakantnye .table__cell:nth-child(4n+5),
.table--expanded .table__body-vakantnye .table__cell:last-child {
  border-right: none;
}

