/* KK Specification Table Widget Styles */

.kk-st-wrap {
    --kk-st-border: #eef0f4;
    --kk-st-cell-pad: 24px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--kk-st-border);
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
}

.kk-st-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: fixed;
}

/* Header */
.kk-st-table thead {
    background-color: #f7f9fc;
}

.kk-st-table thead th {
    text-align: left;
    padding: 18px var(--kk-st-cell-pad);
    color: #9aa3b2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--kk-st-border);
    background-color: inherit;
}

/* Body rows */
.kk-st-table tbody tr {
    transition: background-color 0.2s ease;
}

.kk-st-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--kk-st-border);
}

.kk-st-table tbody tr:hover {
    background-color: #f7f9fc;
}

.kk-st-table tbody td {
    padding: var(--kk-st-cell-pad);
    vertical-align: top;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Generic cell text */
.kk-st-cell {
    color: #5b6573;
}

.kk-st-cell.is-bold {
    color: #0a2540;
    font-weight: 700;
}

.kk-st-cell.is-italic {
    color: #8a93a3;
    font-style: italic;
}

/* Inquiry icon button */
.kk-st-td-inquiry {
    white-space: nowrap;
}

.kk-st-inquiry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #eaf0ff;
    color: #2563eb;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.kk-st-inquiry:hover {
    background-color: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
}

.kk-st-inquiry svg {
    width: 16px;
    height: 16px;
}

/* ===================== RESPONSIVE ===================== */

/* Tablet: keep table but allow horizontal scroll */
@media (max-width: 1024px) and (min-width: 768px) {
    .kk-st-wrap {
        overflow-x: auto;
    }
    .kk-st-table {
        min-width: 720px;
    }
}

/* Mobile: collapse each row into a stacked card */
@media (max-width: 767px) {
    .kk-st-wrap {
        border: none;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .kk-st-table {
        table-layout: auto;
    }

    .kk-st-table colgroup {
        display: none;
    }

    .kk-st-table,
    .kk-st-table tbody,
    .kk-st-table tbody tr,
    .kk-st-table tbody td {
        display: block;
        width: 100%;
    }

    /* Visually hide thead on mobile (accessible) */
    .kk-st-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .kk-st-table tbody tr {
        background-color: #ffffff;
        border: 1px solid var(--kk-st-border);
        border-radius: 14px;
        margin-bottom: 16px;
        overflow: hidden;
    }

    .kk-st-table tbody tr:hover {
        background-color: #ffffff;
    }

    .kk-st-table tbody td {
        padding: 14px 18px;
        text-align: left !important;
        border-bottom: 1px solid var(--kk-st-border);
    }

    .kk-st-table tbody tr td:last-child {
        border-bottom: none;
    }

    .kk-st-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #9aa3b2;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    /* Hide label row if data-label is empty (column with blank header) */
    .kk-st-table tbody td[data-label=""]::before {
        display: none;
    }

    /* Inquiry cell on mobile: label on left, icon on right */
    .kk-st-table tbody td.kk-st-td-inquiry {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .kk-st-table tbody td.kk-st-td-inquiry::before {
        margin-bottom: 0;
    }
}
