/* RCAD native download block */
.sep-detalles-archivo {
    max-width: 760px;
    margin: 30px auto 22px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.sep-det-titulo {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf5;
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sep-det-lista {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sep-det-lista li {
    display: grid;
    grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 13px 0;
    border-bottom: 1px solid #eef2f7;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.65;
}

.sep-det-lista li:last-child {
    border-bottom: 0;
}

.sep-det-lista strong {
    color: #0f172a;
    font-weight: 750;
    text-transform: lowercase;
}

.sep-det-lista span {
    min-width: 0;
    color: #334155;
}

.sep-det-cats span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sep-det-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
}

.sep-det-badge:hover,
.sep-det-badge:focus {
    background: #0f766e;
    color: #fff;
    text-decoration: none;
}

.rcad-download-card,
.rcad-download-block-editor .rcad-block-preview-card {
    max-width: 760px;
    margin: 28px auto;
    padding: 20px;
    border: 1px solid #b7f3d0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
    box-shadow: 0 14px 34px rgba(15, 118, 110, 0.08);
}

.rcad-download-ad {
    margin: 0 0 18px;
}

.rcad-download-ad:empty {
    display: none;
}

.rcad-download-main {
    display: flex;
    justify-content: flex-start;
}

.rcad-download-btn,
.rcad-block-button-preview {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: min(100%, 460px);
    padding: 16px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e 0%, #16a34a 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 14px 26px rgba(15, 118, 110, 0.25);
}

.rcad-download-btn:hover,
.rcad-download-btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(15, 118, 110, 0.32);
}

.rcad-download-icon,
.rcad-block-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.rcad-download-icon svg,
.rcad-block-icon svg {
    width: 100%;
    height: 100%;
}

.rcad-download-text,
.rcad-block-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.rcad-download-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.rcad-download-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
}

.rcad-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.rcad-download-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    color: #166534;
    font-size: 12px;
    font-weight: 700;
}

.rcad-download-note {
    margin: 14px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.rcad-download-block-editor .rcad-block-input {
    min-height: 0;
    padding: 3px 6px;
    border: 0;
    border-bottom: 1px dashed rgba(255,255,255,0.55);
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    box-shadow: none;
}

.rcad-download-block-editor .rcad-block-input:focus {
    outline: none;
    box-shadow: none;
    border-bottom-color: #fff;
}

.rcad-download-block-editor .is-title {
    min-width: 180px;
    font-weight: 800;
}

.rcad-download-block-editor .is-small {
    width: 86px;
    color: rgba(255,255,255,0.82);
    font-size: 12px;
}

.rcad-download-block-editor .is-pill {
    width: 78px;
    border: 0;
    color: #166534;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.rcad-block-title-row,
.rcad-block-subtitle-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rcad-block-title-row > span {
    color: rgba(255,255,255,0.76);
    font-size: 13px;
    font-weight: 700;
}

.rcad-block-free {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
}

.rcad-block-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.rcad-block-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rcad-block-fields {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.76);
}

.rcad-block-fields label {
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.rcad-block-fields .rcad-block-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d7dde8;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

@media (max-width: 640px) {
    .sep-detalles-archivo {
        margin: 24px auto 18px;
        padding: 18px;
        border-radius: 12px;
    }

    .sep-det-titulo {
        font-size: 17px;
    }

    .sep-det-lista li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 0;
    }

    .rcad-download-card,
    .rcad-download-block-editor .rcad-block-preview-card {
        padding: 16px;
    }

    .rcad-download-main,
    .rcad-download-btn,
    .rcad-block-button-preview {
        width: 100%;
    }

    .rcad-download-btn,
    .rcad-block-button-preview {
        justify-content: flex-start;
        padding: 14px 16px;
    }
}

/* RCAD download block v2 - desktop/mobile variants */
.rcad-download-card {
    --rcad-dl-green-900: #0d3b22;
    --rcad-dl-green-800: #145c35;
    --rcad-dl-green-700: #1a7a4a;
    --rcad-dl-green-100: #d6f5e7;
    --rcad-dl-green-50: #f0fbf5;
    --rcad-dl-ink: #0f1a13;
    --rcad-dl-ink-60: rgba(15,26,19,0.6);
    --rcad-dl-ink-20: rgba(15,26,19,0.12);
    --rcad-dl-surface: #f5f7f5;
    max-width: 760px;
    margin: 28px auto;
    padding: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rcad-dl-ink-20);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

.rcad-download-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rcad-dl-green-700);
}

.rcad-dl-mobile {
    display: none;
}

.rcad-format-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
    padding: 3px 8px;
    border: 1px solid var(--rcad-dl-green-100);
    border-radius: 4px;
    background: var(--rcad-dl-green-50);
    color: var(--rcad-dl-green-800);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.rcad-format-chip svg {
    width: 11px;
    height: 11px;
}

.rcad-file-name {
    margin: 0 0 4px;
    color: var(--rcad-dl-ink-60);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0;
}

.rcad-resource-title {
    margin: 0 0 20px;
    color: var(--rcad-dl-ink);
    font-size: 19px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
}

.rcad-btn-download-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--rcad-dl-green-700);
    color: #fff;
    text-decoration: none;
    transition: background .18s ease, transform .12s ease;
}

.rcad-btn-download-pro:hover,
.rcad-btn-download-pro:focus {
    background: var(--rcad-dl-green-800);
    color: #fff;
    text-decoration: none;
}

.rcad-btn-download-pro:active {
    transform: scale(.985);
}

.rcad-btn-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rcad-btn-icon {
    display: flex;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,.15);
}

.rcad-btn-icon svg,
.rcad-btn-arrow svg,
.rcad-btn-compact svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.rcad-btn-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.rcad-btn-label {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.rcad-btn-sub {
    color: rgba(255,255,255,.68);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
}

.rcad-btn-arrow {
    display: flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    transition: background .18s ease, transform .18s ease;
}

.rcad-btn-download-pro:hover .rcad-btn-arrow {
    background: rgba(255,255,255,.22);
    transform: translateX(3px);
}

.rcad-dl-sep {
    height: 1px;
    margin: 20px 0;
    background: var(--rcad-dl-ink-20);
}

.rcad-dl-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.rcad-dl-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.rcad-dl-badge-free,
.rcad-dl-badge-check {
    border-color: #a8dfc3;
    background: #eaf6f0;
    color: #145c35;
}

.rcad-dl-badge-format {
    border-color: #b5d4f4;
    background: #e6f1fb;
    color: #0c447c;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .04em;
}

.rcad-dl-badge-size {
    border-color: var(--rcad-dl-ink-20);
    background: var(--rcad-dl-surface);
    color: var(--rcad-dl-ink-60);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.rcad-dl-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.rcad-dl-stat {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--rcad-dl-surface);
    text-align: center;
}

.rcad-dl-stat-num {
    color: var(--rcad-dl-ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.rcad-dl-stat-label {
    margin-top: 3px;
    color: var(--rcad-dl-ink-60);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rcad-download-note {
    margin-top: 14px;
    color: var(--rcad-dl-ink-60);
    font-size: 12px;
}

.rcad-compact-header,
.rcad-compact-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rcad-compact-header {
    margin-bottom: 12px;
}

.rcad-compact-title {
    min-width: 0;
    color: var(--rcad-dl-ink);
    font-size: 15px;
    font-weight: 700;
}

.rcad-compact-meta,
.rcad-compact-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rcad-btn-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--rcad-dl-green-700);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}

.rcad-btn-compact:hover,
.rcad-btn-compact:focus {
    background: var(--rcad-dl-green-800);
    color: #fff;
    text-decoration: none;
}

.rcad-btn-compact:active {
    transform: scale(.98);
}

.rcad-compact-info {
    margin-top: 12px;
}

.rcad-compact-license {
    color: var(--rcad-dl-ink-60);
    font-size: 11px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .rcad-download-card {
        padding: 20px;
    }

    .rcad-dl-desktop {
        display: none;
    }

    .rcad-dl-mobile {
        display: block;
    }

    .rcad-download-note {
        display: none;
    }
}
