/**
 * WCRS Attachments Widget Styles
 *
 * List of attachment cards with download buttons.
 * WCAG 2.1 AA compliant.
 */

/* ==========================================================================
   Container
   ========================================================================== */

.wcrs-attachments {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Section Title
   ========================================================================== */

.wcrs-attachments-title {
    font-family: 'sofia-pro', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    color: #012D5B;
    margin: 0 0 16px 0;
}

/* ==========================================================================
   Attachments List
   ========================================================================== */

.wcrs-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   Attachment Card
   ========================================================================== */

.wcrs-attachment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #FAFAFA;
    border-radius: 16px;
    gap: 16px;
}

.wcrs-attachment-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.wcrs-attachment-name {
    font-family: 'sofia-pro', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    color: #012D5B;
    margin: 0;
    word-wrap: break-word;
}

.wcrs-attachment-description {
    font-family: 'sofia-pro', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    color: #9D9D9D;
    margin: 4px 0 0 0;
}

/* ==========================================================================
   Download Button
   ========================================================================== */

.wcrs-attachment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px 12px 24px;
    background-color: #012D5B;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
    min-height: 44px; /* WCAG touch target */
}

.wcrs-attachment-button:hover {
    opacity: 0.9;
}

.wcrs-attachment-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wcrs-attachment-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wcrs-attachment-button-text {
    font-family: 'sofia-pro', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    white-space: nowrap;
}

.wcrs-attachment-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.wcrs-attachment-button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.wcrs-attachments-empty {
    font-family: 'sofia-pro', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    color: #9D9D9D;
    margin: 0;
    padding: 16px;
    text-align: center;
}

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

@media (max-width: 640px) {
    .wcrs-attachment-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .wcrs-attachment-name {
        font-size: 18px;
        line-height: 26px;
    }

    .wcrs-attachment-button {
        width: 100%;
        justify-content: center;
    }
}
