/*
 * COFEN - Componente responsivo de anexos
 * Versão 1.0.0
 */

.cofen-attachments {
    margin: 32px 0 40px;
    width: 100%;
}

.cofen-attachments__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cofen-attachments__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    color: #0078bf;
    background: #eaf5fc;
    font-size: 19px;
}

.cofen-attachments__header h4 {
    margin: 0;
    color: #006ba8;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.cofen-attachments__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cofen-attachments__item {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cofen-attachments__card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 88px;
    height: 100%;
    padding: 17px;
    border: 1px solid #dce8f0;
    border-radius: 10px;
    background: #fff;
    color: #263b4a;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.cofen-attachments__card:hover,
.cofen-attachments__card:focus {
    border-color: #0078bf;
    background: #f8fcff;
    box-shadow: 0 4px 16px rgba(0, 120, 191, 0.09);
    text-decoration: none;
}

.cofen-attachments__card:focus-visible {
    outline: 3px solid #0078bf;
    outline-offset: 3px;
}

.cofen-attachments__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: #eaf5fc;
    color: #0078bf;
    font-size: 24px;
}

.cofen-attachments__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.cofen-attachments__title {
    color: #1e4058;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cofen-attachments__meta {
    color: #657c8b;
    font-size: 12px;
    line-height: 1.4;
    text-transform: uppercase;
}

.cofen-attachments__action {
    flex: 0 0 auto;
    margin-left: 4px;
    color: #0078bf;
    font-size: 17px;
}

.cofen-attachments__card:hover .cofen-attachments__title,
.cofen-attachments__card:focus .cofen-attachments__title {
    color: #0078bf;
}

@media (max-width: 767px) {

    .cofen-attachments {
        margin: 25px 0 30px;
    }

    .cofen-attachments__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .cofen-attachments__card {
        min-height: 76px;
        padding: 13px;
        gap: 12px;
    }

    .cofen-attachments__icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 21px;
    }

    .cofen-attachments__header h4 {
        font-size: 17px;
    }

    .cofen-attachments__title {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cofen-attachments__card {
        transition: none;
    }
}
