/* File: assets/css/attachment-list.css */

.eal-attachment-list {
    width: 100%;
}

.eal-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.eal-attachment-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #dee2e6;
}

.eal-attachment-content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.eal-attachment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.eal-attachment-icon i {
    font-size: 18px;
    color: #6c757d;
}

/* File type specific icon colors */
.eal-attachment-icon .fa-file-pdf {
    color: #dc3545;
}

.eal-attachment-icon .fa-file-word {
    color: #0056b3;
}

.eal-attachment-icon .fa-file-excel {
    color: #28a745;
}

.eal-attachment-icon .fa-file-powerpoint {
    color: #fd7e14;
}

.eal-attachment-icon .fa-file-image {
    color: #20c997;
}

.eal-attachment-icon .fa-file-video {
    color: #6f42c1;
}

.eal-attachment-icon .fa-file-audio {
    color: #e83e8c;
}

.eal-attachment-icon .fa-file-archive {
    color: #ffc107;
}

.eal-attachment-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eal-attachment-title {
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    line-height: 1.4;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eal-attachment-size {
    font-size: 12px;
    color: #6c757d;
    display: block;
}

.eal-attachment-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #fff;
    border-radius: 50%;
    margin-left: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.eal-attachment-action i {
    font-size: 14px;
    color: #6c757d;
}

.eal-attachment-item:hover .eal-attachment-action {
    background-color: #007bff;
    transform: scale(1.1);
}

.eal-attachment-item:hover .eal-attachment-action i {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eal-attachment-item {
        padding: 12px 15px;
    }
    
    .eal-attachment-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .eal-attachment-icon i {
        font-size: 16px;
    }
    
    .eal-attachment-title {
        font-size: 14px;
    }
    
    .eal-attachment-action {
        width: 28px;
        height: 28px;
        margin-left: 10px;
    }
    
    .eal-attachment-action i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .eal-attachment-item {
        padding: 10px 12px;
    }
    
    .eal-attachment-title {
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .elementor-editor-active .eal-attachment-item,
    .elementor-editor-dark-mode .eal-attachment-item {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .elementor-editor-active .eal-attachment-item:hover,
    .elementor-editor-dark-mode .eal-attachment-item:hover {
        background-color: #34495e;
    }
    
    .elementor-editor-active .eal-attachment-icon,
    .elementor-editor-dark-mode .eal-attachment-icon,
    .elementor-editor-active .eal-attachment-action,
    .elementor-editor-dark-mode .eal-attachment-action {
        background-color: #1a252f;
    }
    
    .elementor-editor-active .eal-attachment-title,
    .elementor-editor-dark-mode .eal-attachment-title {
        color: #ecf0f1;
    }
}

/* Loading state */
.eal-attachment-item.loading {
    pointer-events: none;
    opacity: 0.6;
}

.eal-attachment-item.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Alternative layout styles */
.eal-attachment-list.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.eal-attachment-list.grid-layout .eal-attachment-item {
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

.eal-attachment-list.grid-layout .eal-attachment-content {
    flex-direction: column;
}

.eal-attachment-list.grid-layout .eal-attachment-icon {
    margin-right: 0;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
}

.eal-attachment-list.grid-layout .eal-attachment-icon i {
    font-size: 24px;
}

.eal-attachment-list.grid-layout .eal-attachment-info {
    text-align: center;
}

.eal-attachment-list.grid-layout .eal-attachment-title {
    white-space: normal;
    word-break: break-word;
}

.eal-attachment-list.grid-layout .eal-attachment-action {
    position: absolute;
    top: 10px;
    right: 10px;
    margin-left: 0;
}