/* =========================================================
   KS Produktegenskaber — Frontend CSS
   ========================================================= */

.ks-attr-wrapper {
    margin: 16px 0;
    overflow: visible;
}

/* ---- Core table ---- */
.ks-attr-table {
    border-collapse: collapse;
    font-family: inherit;
    font-size: 13px;
}

/* ---- 100% bredde (standard) ---- */
.ks-attr-table.ks-width-full {
    width: 100%;
    table-layout: fixed;
}

/* Fixed layout: icon + name fast, value fylder resten */
.ks-attr-table.ks-width-full .ks-icon-cell {
    width: 52px;
}
.ks-attr-table.ks-width-full .ks-name-cell {
    width: 40%;
}
.ks-attr-table.ks-width-full td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0; /* trigger ellipsis med fixed layout */
}

/* ---- Auto bredde: tilpasser sig indhold ---- */
.ks-attr-table.ks-width-auto {
    width: auto;
    table-layout: auto;
}
.ks-attr-table.ks-width-auto td {
    white-space: nowrap; /* ingen linjeskift — bredden vokser med indhold */
    overflow: visible;
    max-width: none;
}

/* ---- Alle rækker ---- */
.ks-attr-table .ks-attr-row {
    height: var(--ks-row-height, 48px);
    border-bottom: 1px solid #ececec;
}
.ks-attr-table .ks-attr-row:last-child {
    border-bottom: none;
}

/* ---- Fælles celle-styling ---- */
.ks-attr-table td {
    padding: 0 12px;
    vertical-align: middle;
    line-height: 1.3;
}

/* ---- Ikon-celle ---- */
.ks-attr-table .ks-icon-cell {
    min-width: 44px;
    text-align: center;
    padding: 0 6px;
}
.ks-attr-table .ks-icon-cell img {
    width: var(--ks-icon-size, 32px);
    height: var(--ks-icon-size, 32px);
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}
.ks-attr-table .ks-icon-placeholder { color: #ccc; }

/* ---- Navn-celle ---- */
.ks-attr-table .ks-name-cell {
    color: #666;
    font-weight: 500;
    padding-right: 20px; /* lidt luft mellem navn og værdi */
}

/* ---- Værdi-celle ---- */
.ks-attr-table .ks-value-cell {
    font-weight: 600;
    color: #222;
}

/* ---- Header-række ---- */
.ks-attr-table .ks-header-row th {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    border-bottom: 2px solid #ececec;
}

/* ---- Stilarter ---- */

/* Standard — subtil ydre kant */
.ks-stil-standard .ks-attr-wrapper {
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
}

/* Zebra */
.ks-stil-zebra .ks-attr-row:nth-child(odd) {
    background: #f8f8f8;
}

/* Minimal — ingen linjer */
.ks-stil-minimal .ks-attr-row {
    border-bottom: none;
}
.ks-stil-minimal .ks-attr-table td {
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Bordered — ramme om alle celler */
.ks-stil-bordered .ks-attr-wrapper {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
}
.ks-stil-bordered .ks-attr-table {
    border-collapse: collapse;
}
.ks-stil-bordered .ks-attr-table td {
    border: 1px solid #e8e8e8;
}

/* Card — hævet kort med skygge */
.ks-stil-card .ks-attr-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 14px rgba(0,0,0,.09);
    overflow: hidden;
}
.ks-stil-card .ks-attr-row {
    border-bottom: 1px solid #f0f0f0;
}
.ks-stil-card .ks-attr-row:last-child {
    border-bottom: none;
}
.ks-stil-card .ks-name-cell {
    background: #fafafa;
}

/* Compact — tæt pakket, lille skrift */
.ks-stil-compact .ks-attr-table td {
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 12px;
}
.ks-stil-compact .ks-attr-row {
    height: auto;
    min-height: 36px;
    border-bottom: 1px solid #f0f0f0;
}
.ks-stil-compact .ks-attr-row:last-child {
    border-bottom: none;
}

/* Grøn accent */
.ks-stil-green .ks-attr-wrapper {
    border-radius: 8px;
    overflow: hidden;
}
.ks-stil-green .ks-attr-row {
    border-bottom: 1px solid rgba(74,124,89,.12);
}
.ks-stil-green .ks-attr-row:last-child {
    border-bottom: none;
}
.ks-stil-green .ks-name-cell {
    color: #4a7c59;
    font-weight: 600;
}
.ks-stil-green .ks-value-cell {
    color: #1a1a1a;
}

/* Mørk */
.ks-stil-dark .ks-attr-wrapper {
    background: #2a3a2e;
    border-radius: 8px;
    overflow: hidden;
}
.ks-stil-dark .ks-attr-table {
    background: #2a3a2e;
}
.ks-stil-dark .ks-attr-row {
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ks-stil-dark .ks-attr-row:last-child {
    border-bottom: none;
}
.ks-stil-dark .ks-name-cell {
    color: #8fba9a;
}
.ks-stil-dark .ks-value-cell {
    color: #e8f0ea;
}
.ks-stil-dark .ks-icon-placeholder {
    color: rgba(255,255,255,.3);
}

/* ---- Responsiv ---- */
@media ( max-width: 600px ) {
    .ks-attr-table .ks-name-cell { font-size: 12px; }
    .ks-attr-table .ks-value-cell { font-size: 12px; }
    .ks-attr-table .ks-icon-cell { min-width: 36px; padding: 0 4px; }
    .ks-attr-table .ks-icon-cell img { width: 24px; height: 24px; }
}
