/* Attachment Styles */
@import "colors.css";

/* Attachment Cards */
.attachment-card-pj {
    display: flex;
    padding: 16px;
    align-items: center;
    gap: 40px;
    border-radius: 12px;
    border: 1px solid var(--color-emerald-100);
    background: var(--color-emerald-50);
}

.attachment-card-pj:hover {
    border-color: var(--color-primary-950);
}

/* Attachment File Info */
.attachment-file-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.attachment-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-gray-50);
    border-radius: 8px;
    flex-shrink: 0;
}

.attachment-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.attachment-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray-900);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-size {
    font-size: 12px;
    color: var(--color-gray-600);
    margin: 0;
}

/* Attachment Actions */
.attachment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Drop Area */
.attachment-drop-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 60px 16px;
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.attachment-drop-area:hover {
    background: #f1f5f9;
    border-color: #00275c;
}

.attachment-drop-area.dragover {
    background: #eff6ff;
    border-color: #00275c;
    border-style: solid;
}

.drop-area-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-area-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--color-white);
    border-radius: 100px;
}

.drop-area-content p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.drop-area-content u {
    color: var(--color-primary-950);
    text-decoration: underline;
    cursor: pointer;
}

/* Attachments List Container */
.attachments-list-container {
    display: flex;       
    flex-wrap: wrap;  
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .attachment-card-pj {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .attachment-file-info {
        width: 100%;
    }

    .attachment-actions {
        align-self: flex-end;
    }

    .attachment-drop-area {
        min-height: 100px;
        padding: 16px;
    }

    .drop-area-content {
        gap: 8px;
    }

    .drop-area-icon {
        width: 40px;
        height: 40px;
    }
}

/* Animation for new attachments */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.attachment-card-pj.new-attachment {
    animation: slideIn 0.3s ease-out;
}

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

.attachment-card-pj.loading .attachment-name::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: "";
    }

    40% {
        content: ".";
    }

    60% {
        content: "..";
    }

    80%,
    100% {
        content: "...";
    }
}