/* =========================================================
   JaimeDiaz.TV — Archivos adjuntos DLE
   ========================================================= */

.jdr-attachment {
    position: relative;

    width: 100%;
    min-width: 0;

    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    margin: 24px 0;
    padding: 18px;

    overflow: hidden;

    border: 1px solid rgba(35, 58, 97, 0.12);
    border-radius: 16px;

    color: #182238;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 72%,
            #fff9f3 100%
        );

    box-shadow: 0 12px 30px rgba(23, 35, 60, 0.07);
}

.jdr-attachment::before {
    content: "";

    position: absolute;
    inset: 0 auto 0 0;

    width: 4px;

    background: #f47321;
}

.jdr-attachment__icon {
    width: 56px;
    height: 56px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(244, 115, 33, 0.28);
    border-radius: 14px;

    color: #e85d0f;
    background: #fff8ef;

    font-size: 1.15rem;
}

.jdr-attachment__body {
    min-width: 0;
}

.jdr-attachment__eyebrow {
    display: block;

    margin-bottom: 4px;

    color: #c65d13;

    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.jdr-attachment__name {
    display: block;

    overflow-wrap: anywhere;

    color: #17233c;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}

a.jdr-attachment__name {
    transition: color 160ms ease;
}

a.jdr-attachment__name:hover {
    color: #e85d0f;
}

.jdr-attachment__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;

    margin-top: 7px;

    color: #667085;

    font-size: 0.74rem;
    line-height: 1.35;
}

.jdr-attachment__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jdr-attachment__meta i {
    color: #8090a6;
}

.jdr-attachment__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.jdr-attachment__button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 14px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;

    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.jdr-attachment__button:hover {
    transform: translateY(-1px);
}

.jdr-attachment__button--download {
    color: #ffffff;
    background: #17233c;

    box-shadow: 0 8px 18px rgba(23, 35, 60, 0.16);
}

.jdr-attachment__button--download:hover {
    color: #ffffff;
    background: #233a61;
}

.jdr-attachment__button--online {
    border-color: rgba(35, 58, 97, 0.15);

    color: #233a61;
    background: #ffffff;
}

.jdr-attachment__button--online:hover {
    border-color: rgba(232, 93, 15, 0.28);

    color: #e85d0f;
    background: #fff9f3;
}


/* =========================================================
   Acceso restringido
   ========================================================= */

.jdr-attachment--locked {
    grid-template-columns: 56px minmax(0, 1fr);

    border-color: rgba(102, 112, 133, 0.18);

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fafc 100%
        );

    box-shadow: none;
}

.jdr-attachment--locked::before {
    background: #98a2b3;
}

.jdr-attachment--locked .jdr-attachment__icon {
    border-color: rgba(102, 112, 133, 0.2);

    color: #667085;
    background: #f2f4f7;
}

.jdr-attachment--locked .jdr-attachment__eyebrow {
    color: #667085;
}

.jdr-attachment__message {
    max-width: 680px;

    margin: 6px 0 0;

    color: #667085;

    font-size: 0.78rem;
    line-height: 1.5;
}


/* =========================================================
   Accesibilidad
   ========================================================= */

.jdr-attachment a:focus-visible {
    outline: 3px solid rgba(244, 115, 33, 0.28);
    outline-offset: 3px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 720px) {

    .jdr-attachment {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 14px;

        padding: 15px;
    }

    .jdr-attachment__icon {
        width: 48px;
        height: 48px;

        border-radius: 12px;
    }

    .jdr-attachment__actions {
        grid-column: 1 / -1;

        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        justify-content: stretch;
    }

    .jdr-attachment__button {
        width: 100%;
    }

    .jdr-attachment--locked {
        grid-template-columns: 48px minmax(0, 1fr);
    }

}

@media (max-width: 460px) {

    .jdr-attachment__actions {
        grid-template-columns: 1fr;
    }

    .jdr-attachment__meta {
        display: grid;
        gap: 5px;
    }

}
