﻿
/* ================ CARD BODY =================================================================== */

.card {
    position: relative;
    display: flex;
    flex: 1 0 auto;
    word-wrap: break-word;
    cursor: pointer;
    border-radius: var(--border-radius);
    border-style: solid;
    border-width: var(--border-thickness);
    border-color: var(--light-gray);
    padding: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
    .card:hover  { border-color: var(--limseo-lblue); }
    .card.active { border-color: var(--limseo-light-lblue); }
    .card.card_row { flex-direction: row; }
    .card.card_column { flex-direction: column; }

/* ================ CARD IMAGE SECTION ========================================================== */

.card > .card_image_section {
    order: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    border-radius: 12px;
    border-width: var(--border-thickness);
    background-repeat: no-repeat;
    background-position: center;
}
.card.card_row > .card_image_section {
    left: 0;
    top: 0;
    bottom: 0;
    width: 150px; /* a changer */

    border-right-style: solid;
    border-right-color: var(--light-gray);
}
.card.card_column > .card_image_section {
    left: 0;
    right: 0;
    top: 0;
    height: 100px; /* a changer */
    border-bottom-style: solid;
    border-bottom-color: var(--light-gray);
}

/* ================ CARD CONTENT SECTION ======================================================== */

.card > .card_content_section {
    order: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
    .card > .card_content_section * {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

/* title sub-section */
.card .card_title_section { font-family: var(--limseo-title-font-family); }
    .card h1 {
        font-size: 1.6rem;
        text-align: start;
        font-weight: 700;
        padding: 0;
        margin: 0;
    }
    .card h2 {
        font-size: 1.4rem;
        text-align: start;
        font-weight: 500;
        padding: 0;
        margin: 0;
    }

/* text sub-section */
.card .card_text_section { font-size: 0.95rem; }

/* ================ CARD EXPENDABLE SECTION ===================================================== */

.card > .card_expendable_section { order: 2; }

/* ================ CARD AUTONOMOUS ELEMENTS ==================================================== */

/* the separators */
hr.card_separator {
    height: var(--border-thickness);
    background-color: var(--light-gray);
    border: solid;
    border-width: 0;
    border-radius: 0.5rem;
    border-color: transparent;
    margin: 0.63rem 1rem;
}
.expendable > hr.card_separator {
    margin-left: 0;
    margin-right: 0;
}

/* the buttons */
.card .card_buttons_section {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: end;
    align-items: flex-start;
    cursor: default;
    overflow: visible;
    gap: 1rem;

    margin-top: auto;
    width: 100%;
}

/* the attachment preview button */
.card > .card_attachment {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
}

/* ================ CARD OTHER STYLING ========================================================== */

.save_space_bellow:has(+ *),
*:has(+ .save_space_above) { margin-bottom: .7rem; }

/* ================ CARDS CONTAINER ============================================================= */

body > .main > .cards-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    padding: .2rem 2rem 1rem;
    gap: 8px;
}