/* ============================================================
   Brushyourideas_CustomFileUpload — PDP Upload Widget Styles
   ============================================================ */

/* Container */
.cfu-widget {
    margin-bottom: 20px;
    font-family: inherit;
}

/* Header */
.cfu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cfu-icon {
    display: flex;
    align-items: center;
    color: #444;
}

.cfu-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Dropzone */
.cfu-dropzone {
    border: 2px dashed #c8c8c8;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.cfu-dropzone:hover,
.cfu-dropzone.dz-drag-hover {
    border-color: #1a1a1a;
    background: #f3f3f3;
}

.cfu-dropzone.dz-started {
    min-height: auto;
    padding: 14px 16px;
}

/* Dropzone message */
.cfu-dz-message {
    text-align: center;
    pointer-events: none;
}

.cfu-dz-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    color: #888;
}

.cfu-dz-text {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    margin: 0 0 4px;
}

.cfu-dz-subtext {
    font-size: 13px;
    color: #777;
    margin: 0 0 8px;
}

.cfu-browse-link {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

.cfu-dz-limits {
    font-size: 11px;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

/* File list */
.cfu-file-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* File card */
.cfu-file-card {
    position: relative;
    width: 100px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.cfu-file-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

/* Thumbnail */
.cfu-thumb {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.cfu-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cfu-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 8px 8px 0 0;
}

.cfu-thumb-placeholder span {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    letter-spacing: 0.04em;
}

/* File info */
.cfu-file-info {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cfu-file-name {
    font-size: 10px;
    color: #444;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.cfu-view-link {
    font-size: 10px;
    color: #1a1a1a;
    text-decoration: underline;
    line-height: 1;
}

.cfu-view-link:hover {
    color: #555;
}

/* Remove button */
.cfu-remove-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d32f2f;
    border: 2px solid #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: background 0.15s ease, transform 0.15s ease;
}

.cfu-remove-btn:hover {
    background: #b71c1c;
    transform: scale(1.1);
}

.cfu-remove-btn svg {
    width: 10px;
    height: 10px;
    stroke-width: 2.5;
}

/* Upload loader */
.cfu-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-top: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

.cfu-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #d0d0d0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    flex-shrink: 0;
    animation: cfu-spin 0.7s linear infinite;
}

@keyframes cfu-spin {
    to { transform: rotate(360deg); }
}

.cfu-loader-text {
    font-size: 13px;
    color: #444;
    font-weight: 500;
}

/* Mobile */
@media (max-width: 480px) {
    .cfu-dropzone {
        min-height: 100px;
        padding: 16px 12px;
    }

    .cfu-file-card {
        width: 85px;
    }

    .cfu-thumb {
        height: 65px;
    }
}
