/* =========================================================
   Ondernemerstoolkit - Affiliate Vergelijker
   Compacte 4-koloms layout
   ========================================================= */

.otk-comparator {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}


/* =========================================================
   FILTERPANEEL
   ========================================================= */

.otk-filter-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.otk-filter-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.otk-filter-item {
    min-width: 0;
}

.otk-filter-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #374151;
}

.otk-filter-item select {
    width: 100%;
    min-height: 42px;
    padding: 8px 34px 8px 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

.otk-filter-item select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.10);
}

.otk-filter-checkbox {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.otk-filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.otk-filter-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}


/* =========================================================
   FUNCTIES FILTER
   ========================================================= */

.otk-function-filter {
    margin-top: 14px;
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
}

.otk-function-filter summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.otk-function-filter summary::-webkit-details-marker {
    display: none;
}

.otk-function-filter summary::after {
    content: "＋";
    font-size: 16px;
    line-height: 1;
}

.otk-function-filter[open] summary::after {
    content: "−";
}

.otk-function-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.otk-function-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 18px;
    margin-top: 14px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 8px;
}

.otk-function-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.otk-function-options input {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 0;
}


/* =========================================================
   FILTER ACTIES
   ========================================================= */

.otk-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.otk-filter-button,
.otk-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.otk-filter-button {
    border: 1px solid #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.otk-filter-button:hover {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
}

.otk-reset-button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
}

.otk-reset-button:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    color: #1f2937;
}


/* =========================================================
   RESULTAAT
   ========================================================= */

.otk-result-summary {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
}

.otk-result-summary strong {
    color: #1f2937;
    font-weight: 700;
}

.otk-no-results {
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
}

.otk-no-results strong {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
}


/* =========================================================
   KAARTEN GRID
   ========================================================= */

.otk-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}


/* =========================================================
   KAART
   ========================================================= */

.otk-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 17px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.otk-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
}


/* =========================================================
   LABELS
   ========================================================= */

.otk-card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 24px;
    margin-bottom: 8px;
}

.otk-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.otk-label-free {
    background: #ecfdf5;
    color: #047857;
}

.otk-label-trial {
    background: #eff6ff;
    color: #1d4ed8;
}

.otk-label-cheapest {
    background: #fef3c7;
    color: #92400e;
}

.otk-label-functions {
    background: #f3e8ff;
    color: #7e22ce;
}


/* =========================================================
   PROVIDER / TYPE / PAKKET
   ========================================================= */

.otk-provider {
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.otk-package-type {
    margin-bottom: 3px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.otk-package-name {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}


/* =========================================================
   PRIJS
   ========================================================= */

.otk-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.otk-price strong {
    color: #1f2937;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.1;
}

.otk-price span {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.3;
}


/* =========================================================
   DETAILS
   ========================================================= */

.otk-card-details {
    margin-top: 2px;
    border-top: 1px solid #f0f0f0;
}

.otk-card-details summary {
    padding: 10px 0;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
}

.otk-card-details summary::-webkit-details-marker {
    display: none;
}

.otk-card-details summary::after {
    content: "＋";
    float: right;
    font-size: 15px;
}

.otk-card-details[open] summary::after {
    content: "−";
}

.otk-card-detail-content {
    padding: 0 0 5px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.5;
}

.otk-detail-block {
    margin-bottom: 12px;
}

.otk-detail-block:last-child {
    margin-bottom: 0;
}

.otk-detail-block > strong {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.otk-detail-block ul {
    margin: 5px 0 0;
    padding-left: 17px;
}

.otk-detail-block li {
    margin-bottom: 3px;
}


/* =========================================================
   CTA
   ========================================================= */

.otk-card-footer {
    margin-top: auto;
    padding-top: 14px;
}

.otk-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #1d4ed8;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.otk-cta:hover {
    background: #1e40af;
    color: #ffffff !important;
}


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

@media (max-width: 1100px) {

    .otk-filter-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .otk-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .otk-function-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 850px) {

    .otk-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .otk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .otk-function-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 600px) {

    .otk-filter-panel {
        padding: 14px;
        border-radius: 10px;
    }

    .otk-filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .otk-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .otk-function-options {
        grid-template-columns: 1fr;
    }

    .otk-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .otk-filter-button,
    .otk-reset-button {
        width: 100%;
    }

    .otk-card {
        padding: 15px;
    }

    .otk-package-name {
        font-size: 17px;
    }

    .otk-price strong {
        font-size: 21px;
    }
}
/* Data Core 2 additions: keep the existing comparator visual language. */
.otk-card-description {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* Keep long merchant descriptions compact on cards; the full text is added inside the expandable details area by comparator.js. */
.otk-comparator-v2 .otk-card-description {
    max-height: calc(1.5em * 3);
}
.otk-comparator-v2 .otk-card-full-description {
    overflow-wrap: anywhere;
}

.otk-comparator-v2 .otk-card {
    overflow-wrap: anywhere;
}


/* Data Core 2.0.2: enforce non-overlapping grid rows even when theme CSS or legacy comparator styles are present. */
.otk-comparator-v2 .otk-grid {
    display: grid !important;
    row-gap: 24px !important;
    column-gap: 20px !important;
    align-items: stretch !important;
    align-content: start !important;
    grid-auto-flow: row;
}

.otk-comparator-v2 .otk-grid > .otk-card {
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0;
    box-sizing: border-box;
}

@media (max-width: 850px) {
    .otk-comparator-v2 .otk-grid {
        row-gap: 20px !important;
        column-gap: 16px !important;
    }
}

@media (max-width: 600px) {
    .otk-comparator-v2 .otk-grid {
        row-gap: 16px !important;
        column-gap: 0 !important;
    }
}
