/* PDF download gate — popup + gated link styles. */

.dci-pdf-link {
    cursor: pointer;
}

.dci-pdf-link__icon {
    width: 1em;
    height: 1em;
    margin-right: 0.45em;
    flex: 0 0 auto;
}

.dci-pdf-textlink {
    color: var(--blue, #1b4799);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dci-pdf-textlink:hover {
    color: var(--blue-hover, #143778);
}

html.dcat-pdfgate-lock {
    overflow: hidden;
}

.dcat-pdfgate {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px;
    overflow-y: auto;
}

.dcat-pdfgate.is-open {
    display: flex;
}

.dcat-pdfgate__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 28, 52, 0.62);
}

.dcat-pdfgate__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: auto 0;
    padding: 1.75rem 1.75rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 70px -20px rgba(16, 28, 52, 0.45);
    outline: none;
}

.dcat-pdfgate__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted, #808589);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.dcat-pdfgate__close:hover,
.dcat-pdfgate__close:focus-visible {
    background: #f1f3f7;
    color: var(--navy-deep, #274573);
}

.dcat-pdfgate__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--orange-hover, #d97d12);
}

.dcat-pdfgate__title {
    margin: 0 2.25rem 0.45rem 0;
    font-family: var(--font-display, inherit);
    font-size: 1.4rem;
    line-height: 1.2;
    color: var(--navy-deep, #274573);
}

.dcat-pdfgate__intro {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary, #666);
}

.dcat-pdfgate__file {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.75rem;
    background: #f4f6fb;
    border: 1px solid var(--border-blue, #d5dff0);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--navy-deep, #274573);
    word-break: break-all;
}

.dcat-pdfgate__file svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    color: #c0392b;
}

/* Keep the theme's .form-card Gravity Forms overrides, drop the card box. */
.dcat-pdfgate__form.form-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Compact spacing inside the popup: the Orbital theme defaults to a 40px gap
   between rows. Fields placed side by side in the Gravity Forms editor
   (Field Size / drag into a row) sit next to each other here too. */
.dcat-pdfgate .gform_wrapper.gform-theme--foundation,
.dcat-pdfgate .gform_wrapper.gform-theme--framework {
    --gf-form-gap-y: 14px !important;
    --gf-form-gap-x: 12px !important;
    --gf-label-space-primary: 5px !important;
}

.dcat-pdfgate .gform_wrapper .gform_footer {
    margin-top: 18px;
    padding-top: 0;
}

/* Full-width submit; Gravity Forms' Orbital theme sizes buttons with
   higher-specificity selectors, hence !important. */
.dcat-pdfgate .gform_wrapper .gform_footer .gform_button {
    flex: 1 1 100%;
    width: 100% !important;
    justify-content: center;
}

.dcat-pdfgate__success {
    display: none;
    padding: 1rem 0 0.5rem;
    text-align: center;
}

.dcat-pdfgate.is-success .dcat-pdfgate__form-view {
    display: none;
}

.dcat-pdfgate.is-success .dcat-pdfgate__success {
    display: block;
}

.dcat-pdfgate__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #e8f5ee;
    color: #1d8a52;
}

.dcat-pdfgate__check svg {
    width: 26px;
    height: 26px;
}

.dcat-pdfgate__success-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display, inherit);
    font-size: 1.4rem;
    color: var(--navy-deep, #274573);
    outline: none;
}

.dcat-pdfgate__success-file {
    margin: 0 0 1.25rem;
    color: var(--text-secondary, #666);
}

.dcat-pdfgate__note {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, #808589);
}

@media (max-width: 520px) {
    .dcat-pdfgate {
        padding: 12px;
    }

    .dcat-pdfgate__dialog {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .dcat-pdfgate__title {
        font-size: 1.3rem;
    }
}
