/* Customer attachments and shared upload dialog.
   Scoped to the real universal customer modal and standard dropzone modal. */

#dropzone-modal .bb-dropzone {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    padding: var(--bb-sp-6) var(--bb-sp-5);
    border: 1px dashed var(--bb-border-strong) !important;
    border-radius: var(--bb-radius-l) !important;
    background: var(--bb-inset) !important;
    color: var(--bb-text) !important;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

#dropzone-modal .bb-dropzone:hover,
#dropzone-modal .bb-dropzone:focus-within {
    border-color: var(--bb-primary) !important;
    background: var(--bb-primary-soft) !important;
    box-shadow: var(--bb-shadow-1);
}

#dropzone-modal .bb-dropzone .dz-message {
    display: flex;
    width: 100%;
    margin: 0 !important;
    flex-direction: column;
    align-items: center;
    color: var(--bb-text-2) !important;
    text-align: center;
}

#dropzone-modal .bb-dropzone__icon {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--bb-sp-3);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-l);
    background: var(--bb-surface);
    color: var(--bb-text-2);
    box-shadow: var(--bb-shadow-1);
}

#dropzone-modal .bb-dropzone__icon-plus {
    position: absolute;
    right: -5px;
    bottom: -5px;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bb-inset);
    border-radius: 50%;
    background: var(--bb-primary);
    color: var(--bb-on-primary);
    font-size: var(--bb-fs-l);
    font-weight: var(--bb-fw-medium);
    line-height: 1;
}

#dropzone-modal .bb-dropzone:hover .bb-dropzone__icon-plus,
#dropzone-modal .bb-dropzone:focus-within .bb-dropzone__icon-plus {
    border-color: var(--bb-primary-soft);
}

#dropzone-modal .bb-dropzone__prompt {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bb-text);
    font: inherit;
    font-size: var(--bb-fs-m);
    font-weight: var(--bb-fw-semibold);
    line-height: var(--bb-lh-body);
}

#dropzone-modal .bb-dropzone__prompt span {
    color: var(--bb-primary);
}

#dropzone-modal .bb-dropzone__details {
    display: flex;
    margin-top: var(--bb-sp-3);
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--bb-sp-1) var(--bb-sp-3);
    color: var(--bb-text-2);
    font-size: var(--bb-fs-s);
    line-height: var(--bb-lh-body);
}

#dropzone-modal .bb-dropzone__formats {
    display: flex;
    margin-top: var(--bb-sp-3);
    flex-direction: column;
    gap: var(--bb-sp-1);
    color: var(--bb-text-3);
    font-size: var(--bb-fs-s);
    line-height: var(--bb-lh-body);
}

#dropzone-modal .bb-dropzone__formats strong {
    color: var(--bb-text-2);
    font-weight: var(--bb-fw-semibold);
}

#u-customer-modal .customer-info-section-head {
    align-items: center;
    gap: var(--bb-sp-3);
}

#u-customer-modal .customer-info-actions {
    min-width: 0;
    flex-wrap: wrap;
    gap: var(--bb-sp-2);
}

#u-customer-modal .customer-info-actions .bb-btn {
    margin: 0 !important;
}

#u-customer-modal .customer-attachment-row {
    position: relative;
    display: grid;
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: var(--bb-sp-3);
    padding: var(--bb-sp-3);
    border: 1px solid var(--bb-border-strong);
    border-radius: var(--bb-radius-m);
    background: var(--bb-surface-2);
    color: var(--bb-text);
}

#u-customer-modal .customer-attachment-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--bb-sp-3);
}

#u-customer-modal .customer-attachment-thumb {
    position: relative;
    display: flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-s);
    background: var(--bb-inset);
}

#u-customer-modal .customer-attachment-thumb .image-preview,
#u-customer-modal .customer-attachment-thumb .doc {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#u-customer-modal .customer-attachment-thumb .doc {
    padding: var(--bb-sp-2);
    object-fit: contain;
}

#u-customer-modal .customer-attachment-thumb .extension {
    position: absolute;
    right: var(--bb-sp-1);
    bottom: var(--bb-sp-1);
    color: var(--bb-text-2);
    font-size: var(--bb-fs-xs);
    font-weight: var(--bb-fw-semibold);
}

#u-customer-modal .customer-attachment-row .file-text {
    width: auto !important;
    min-width: 0;
    flex: 1 1 auto;
    gap: var(--bb-sp-1);
}

#u-customer-modal .customer-attachment-row .file-name {
    overflow: hidden;
    color: var(--bb-text);
    font-size: var(--bb-fs-m);
    font-weight: var(--bb-fw-semibold);
    line-height: var(--bb-lh-tight);
    text-overflow: ellipsis;
    white-space: nowrap;
}

#u-customer-modal .customer-attachment-row .file-description {
    color: var(--bb-text-3);
    font-size: var(--bb-fs-s);
    line-height: var(--bb-lh-body);
}

#u-customer-modal .customer-attachment-row .hidden-info {
    padding: 1px var(--bb-sp-2);
    border-radius: 999px;
    background: var(--bb-info-bg);
    color: var(--bb-text-2);
}

#u-customer-modal .customer-file-actions {
    display: grid;
    grid-template-columns: 36px auto auto;
    align-items: center;
    gap: var(--bb-sp-2);
}

#u-customer-modal .customer-file-actions .bb-btn {
    margin: 0 !important;
    white-space: nowrap;
}

#u-customer-modal .customer-file-visibility {
    width: 36px;
    min-width: 36px;
    padding: 0;
    color: var(--bb-text-2);
}

#u-customer-modal .customer-file-visibility.is-hidden {
    background: var(--bb-primary-soft);
    color: var(--bb-primary);
}

#u-customer-modal .customer-file-delete {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--bb-radius-s);
    background: transparent;
    color: var(--bb-text-3);
    cursor: pointer;
    font-size: var(--bb-fs-xl);
    line-height: 1;
}

#u-customer-modal .customer-file-delete:hover,
#u-customer-modal .customer-file-delete:focus-visible {
    background: var(--bb-danger-bg);
    color: var(--bb-danger);
}

@media (max-width: 1199.98px) {
    #u-customer-modal .customer-info-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    #u-customer-modal .customer-info-actions {
        width: 100%;
        justify-content: flex-start !important;
    }

    #u-customer-modal .customer-attachment-row {
        grid-template-columns: minmax(0, 1fr) 24px;
    }

    #u-customer-modal .customer-file-actions {
        width: 100%;
        grid-column: 1 / -1;
        grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr);
    }

    #u-customer-modal .customer-file-delete {
        grid-column: 2;
        grid-row: 1;
    }

    #u-customer-modal .customer-file-action {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    #dropzone-modal .bb-dropzone {
        min-height: 240px;
        padding: var(--bb-sp-5) var(--bb-sp-4);
        border-radius: var(--bb-radius-m) !important;
    }

    #u-customer-modal .customer-attachment-row {
        padding: var(--bb-sp-3);
    }
}
