/* KlubKlar downloadable checklist card (videnscenter guides) */

/* Standalone placement outside the videnscenter article column (audience
   pages): cap the width and center the card in the wide section container. */
.kk-pdf-standalone {
    max-width: 760px;
    margin: 0 auto;
}

.kk-pdf-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f8fafc 0%, #eef8fa 100%);
    border: 1px solid #d6eaee;
    border-left: 4px solid #3bb4c4;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
}

.kk-pdf-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3bb4c4;
    color: #fff;
    border-radius: 12px;
    font-size: 24px;
}

.kk-pdf-body {
    flex: 1 1 auto;
    min-width: 0;
}

.kk-pdf-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #1f2933;
}

.kk-pdf-desc {
    margin: 0 0 16px 0;
    color: #52606d;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Primary action: the email form (visible by default) */
.kk-pdf-form {
    margin-top: 2px;
    max-width: 440px;
}

.kk-pdf-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2933;
    margin-bottom: 8px;
}

.kk-pdf-label i {
    color: #3bb4c4;
}

/* Collapsed variant (videnscenter hub): a primary "Få den på mail" button
   that expands the form on click, so a grid of cards doesn't repeat six
   visible email fields. */
.kk-pdf-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* accessible variant: white on bright brand blue is only 2.46:1 */
    background: var(--color-blue-accessible, #2a818d);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    border: none;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.kk-pdf-toggle:hover {
    background: var(--color-blue-hover, #226a74);
    transform: translateY(-1px);
}

.kk-pdf-form-collapsed {
    margin-top: 12px;
}

/* Row holding the collapsed-variant toggle and the "Læs guiden" link */
.kk-pdf-actions-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.kk-pdf-actions-row .vc-dl-source {
    margin-left: auto;
}

/* Collapsed checklist cards on the videnscenter hub: only the first row is
   visible until "Vis alle tjeklister" is pressed. The cards stay in the HTML
   (indexable); without JS everything is visible and the button is hidden. */
.js .vc-dl-collapsed:not(.vc-dl-revealed) {
    display: none;
}

/* Same fade/slide reveal as the guide cards (vc-card-reveal) */
.js .vc-dl-revealed {
    animation: kk-dl-reveal 0.4s ease both;
}

@keyframes kk-dl-reveal {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .js .vc-dl-revealed { animation: none; }
}

.vc-dl-more-wrap {
    text-align: center;
    margin-top: 24px;
}

html:not(.js) .vc-dl-more-wrap {
    display: none;
}

/* On the videnscenter hub the download cards originally used the red accent
   (.vc-dl-download in videnscenter.css) — keep that for the new primary
   actions there, while the in-article cards stay brand-teal. */
.vc-dl-card .kk-pdf-toggle,
.vc-dl-card .kk-pdf-submit {
    background: var(--color-red);
}

.vc-dl-card .kk-pdf-toggle:hover,
.vc-dl-card .kk-pdf-submit:hover:not(:disabled) {
    background: #b02a37;
}

/* Secondary action: the plain un-gated download link */
.kk-pdf-alt {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #cbd7dc;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.kk-pdf-alt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-link, #277884);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.kk-pdf-alt-link:hover {
    text-decoration: underline;
    color: var(--color-link, #277884);
}

.kk-pdf-free-note {
    margin: 0;
    font-size: 0.82rem;
    color: #7b8794;
}

.kk-pdf-inputrow {
    display: flex;
    gap: 8px;
}

.kk-pdf-email {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cbd7dc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1f2933;
    background: #fff;
}

.kk-pdf-email:focus {
    outline: none;
    border-color: #3bb4c4;
    box-shadow: 0 0 0 3px rgba(59, 180, 196, 0.18);
}

.kk-pdf-submit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 10px 16px;
    /* accessible variant: white on bright brand blue is only 2.46:1 */
    background: var(--color-blue-accessible, #2a818d);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.kk-pdf-submit:hover:not(:disabled) {
    background: var(--color-blue-hover, #226a74);
}

.kk-pdf-submit:disabled {
    opacity: 0.7;
    cursor: default;
}

.kk-pdf-status {
    margin: 10px 0 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    min-height: 1px;
}

.kk-pdf-status.is-success {
    color: #067647;
}

.kk-pdf-status.is-error {
    color: #b42318;
}

@media (max-width: 600px) {
    .kk-pdf-card {
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }
    .kk-pdf-form {
        max-width: none;
    }
    .kk-pdf-inputrow {
        flex-direction: column;
    }
    /* 16px inputs prevent iOS Safari from zooming on focus; comfortable
       tap heights (>=44px) for the email field and both action buttons. */
    .kk-pdf-email {
        width: 100%;
        font-size: 16px;
        padding: 12px 14px;
    }
    .kk-pdf-submit {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
        padding: 12px 16px;
    }
    .kk-pdf-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 16px;
    }
    /* The collapsed-variant action row (toggle + "Læs guiden" link) stacks
       so neither is cramped. */
    .kk-pdf-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .kk-pdf-actions-row .vc-dl-source {
        margin-left: 0;
    }
}
