/* Card Container */
.dfr-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
}

/* Individual Full-Width Row */
.dfr-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    border-radius: 8px;
    background-color: var(--dfr-row-bg) !important;
    color: var(--dfr-row-text) !important;
    border: 1px solid var(--dfr-row-border) !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.dfr-card-row:hover {
    background-color: var(--dfr-row-hover-bg) !important;
    color: var(--dfr-row-hover-text) !important;
    border-color: var(--dfr-row-hover-border) !important;
}

/* File Title Section */
.dfr-col-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.dfr-title-link {
    color: inherit !important;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dfr-title-link:hover {
    text-decoration: underline !important;
}

/* Prominent File Extension Badge Box */
.dfr-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0,0,0,0.1);
}

.dfr-file-icon i {
    color: #ffffff !important;
}

/* Dynamic Configuration-Driven Badge Backgrounds */
.dfr-ext-pdf {
    background-color: var(--dfr-badge-pdf) !important;
}

.dfr-ext-zip,
.dfr-ext-rar,
.dfr-ext-7z {
    background-color: var(--dfr-badge-zip) !important;
}

.dfr-ext-doc,
.dfr-ext-docx {
    background-color: var(--dfr-badge-doc) !important;
}

.dfr-ext-xls,
.dfr-ext-xlsx,
.dfr-ext-csv {
    background-color: var(--dfr-badge-xls) !important;
}

.dfr-ext-ppt,
.dfr-ext-pptx {
    background-color: var(--dfr-badge-ppt) !important;
}

.dfr-ext-png,
.dfr-ext-jpg,
.dfr-ext-jpeg,
.dfr-ext-gif,
.dfr-ext-svg {
    background-color: var(--dfr-badge-img) !important;
}

.dfr-ext-file {
    background-color: var(--dfr-badge-default) !important;
}

/* Buttons Container */
.dfr-col-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Configurable Action Buttons */
.dfr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.dfr-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dfr-btn-download {
    background-color: var(--dfr-download-bg) !important;
    color: var(--dfr-download-text) !important;
}

.dfr-btn-download i {
    color: var(--dfr-download-text) !important;
}

.dfr-btn-open {
    background-color: var(--dfr-open-bg) !important;
    color: var(--dfr-open-text) !important;
}

.dfr-btn-open i {
    color: var(--dfr-open-text) !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    .dfr-card-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dfr-col-title {
        width: 100%;
    }

    .dfr-col-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .dfr-btn {
        flex: 1;
        justify-content: center;
    }
}