/* The column summary cards */
/* ------------------------ */

/* Collection of column summary cards (as shown in the "column summaries" tab) */
/* --------------------------------------------------------------------------- */

.column-summary-group {
    display: flex;
    flex-direction: column;
    gap: var(--small);
    padding-block-start: var(--tiny);
    padding-block-end: var(--tiny);
    padding-inline-end: var(--small);
    min-width: min-content;
    max-width: max-content;
}

.column-summary-group > .card {
    margin: 0;
}

/* On small screens, the cards are on top of each other and all have the
   same width. On wide screens, the cards can be next to
   each other and wrap horizontally. */

@media screen and (min-width: 60rem) {
    .column-summary-group {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--small);
    }

}


/* Individual column summary cards */
/* ------------------------------- */

.card {
    padding: 0;
    margin: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, .2), 0px 4px 10px 0px rgba(0, 0, 0, .2);
    min-width: min-content;
}

.card-header {
    border-radius: var(--radius) var(--radius) 0 0;

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 1ch;

    padding: var(--tiny);
    margin-block-end: var(--tiny);
    background-color: var(--header-color, var(--lightg));
    border-block-end: 1px solid var(--mediumg);
}

.card-header > * {
    margin-block-start: 0;
    margin-block-end: 0;
    font-size: var(--large);
}

.card-header input[type="checkbox"] {
    margin-right: var(--micro);
}

.column-summary-content {
    display: flex;
    flex-direction: column;
}

/* The "constant columns" card has a similar aspect to the other ones but a */
/* different color because it does not correspond to an actual column. */

.pseudocolumn {
    --header-color: #ffffff;
}

/* Grid of boxes with copybuttons for a column's most frequent values */

.copybutton-grid {
    display: flex;
    flex-direction: column;
    gap: var(--tiny);
    padding-block-start: var(--tiny);
    padding-block-end: var(--tiny);
}


.grid-separator {
    grid-column: 1/-1;
    justify-self: left;
}


/* Aspects specific to the single card shown in the dataframe sample tab */
/* --------------------------------------------------------------------- */

/* Hide the container when it is empty */

.columns-in-sample-tab:not(:has([data-role="sample-column"]:not([data-hidden]))) {
    display: none;
}

/* The header has the same color as the selected cells in the table */

.columns-in-sample-tab .card-header {
    position: relative;
    background-color: var(--darkgreen);
    border-block-end: 1px solid var(--verydarkgreen);
    padding-right: 2.4rem;
}

/* Button for closing the card / deselecting the column in the table */

.card .close-card-button {
    height: 1.8rem;
    width: 1.8rem;

    padding: var(--micro);
    border: none;
    border-radius: var(--radius);
    background: var(--darkgreen);

    position: absolute;
    top: var(--tiny);
    right: var(--micro);
}

.card .close-card-button:hover {
    background: var(--verydarkgreen);
}
