/* Created: 2026-08-07 20:05 Asia/Shanghai */
/* PLATFORM_UPLOADS_CSS_EXCEPTION: Filament FileUpload does not expose public
   Schema APIs for FilePond's generated preview, list, drop-label, overlay, and
   action-position internals. This is the single shared stylesheet for company
   logos, product assets, TradeShield documents, B2B Studio images, TradePilot
   imports, and future uploads using the same canonical Schema classes. */

/* Product image upload preview cleanup */
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] {
    background: transparent !important;
    box-shadow: none !important;
}

.fi-fo-file-upload .filepond--root,
.fi-fo-file-upload .filepond--drop-label,
.fi-fo-file-upload .filepond--drop-label label,
.fi-fo-file-upload .filepond--panel-root,
.fi-fo-file-upload .filepond--panel,
.fi-fo-file-upload .filepond--file-wrapper {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: inset 0 0 0 1px rgb(229 231 235) !important;
}

.dark .fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    box-shadow: inset 0 0 0 1px rgb(75 85 99 / 0.85) !important;
}

.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    width: calc(25% - 0.75rem) !important;
}

@media (max-width: 1023px) {
    .fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
        width: calc(33.33% - 0.75rem) !important;
    }
}

@media (max-width: 767px) {
    .fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
        width: calc(50% - 0.75rem) !important;
    }
}

.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--file,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item-panel,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-wrapper,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-clip,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--panel-root,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-idle,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-success,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-failure {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-idle,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-success,
.fi-fo-file-upload .filepond--root[data-style-panel-layout='grid'] .filepond--image-preview-overlay-failure {
    display: none !important;
    opacity: 0 !important;
}

/* Generic image upload preview cleanup, used by company logo and other single-image uploads */
.fi-fo-file-upload .filepond--file:has(.filepond--image-preview),
.fi-fo-file-upload .filepond--item-panel:has(.filepond--image-preview),
.fi-fo-file-upload .filepond--image-preview-wrapper,
.fi-fo-file-upload .filepond--image-preview,
.fi-fo-file-upload .filepond--image-clip,
.fi-fo-file-upload .filepond--image-preview-overlay,
.fi-fo-file-upload .filepond--image-preview-overlay-idle,
.fi-fo-file-upload .filepond--image-preview-overlay-success,
.fi-fo-file-upload .filepond--image-preview-overlay-failure {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.fi-fo-file-upload .filepond--image-preview-overlay,
.fi-fo-file-upload .filepond--image-preview-overlay-idle,
.fi-fo-file-upload .filepond--image-preview-overlay-success,
.fi-fo-file-upload .filepond--image-preview-overlay-failure {
    display: none !important;
    opacity: 0 !important;
}

.company-logo-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    width: calc(12.5% - 0.75rem) !important;
}

@media (max-width: 1023px) {
    .company-logo-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
        width: calc(16.66% - 0.75rem) !important;
    }
}

@media (max-width: 767px) {
    .company-logo-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
        width: calc(25% - 0.75rem) !important;
    }
}

.product-assets-card {
    overflow: hidden;
    margin-top: 1.25rem !important;
    border: 1px solid rgb(226 232 240) !important;
    border-radius: 1.25rem !important;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05) !important;
}

.product-assets-card:first-child {
    margin-top: 0 !important;
}

.dark .product-assets-card {
    border-color: rgb(51 65 85) !important;
    background:
        radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 28%),
        linear-gradient(180deg, rgb(15 23 42) 0%, rgb(17 24 39) 100%) !important;
}

.product-assets-card .fi-section-content {
    padding-top: 1.25rem !important;
}

.product-assets-card .fi-fo-field-wrp {
    gap: 0.85rem !important;
}

.product-assets-card .fi-fo-field-wrp-helper-text {
    margin-top: 0.45rem !important;
    max-width: 54rem;
    line-height: 1.6 !important;
}

.product-assets-upload .filepond--root {
    contain: layout style !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

.product-assets-upload .filepond--drop-label {
    position: relative !important;
    inset: auto !important;
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    min-height: 4.25rem !important;
    width: 100% !important;
    margin: 0 !important;
    border: 1px dashed rgb(209 213 219) !important;
    border-radius: 0.25rem !important;
    background: #ffffff !important;
    color: rgb(71 85 105) !important;
}

.dark .product-assets-upload .filepond--drop-label {
    border-color: rgb(139 92 246 / 0.75) !important;
    background: rgb(15 23 42) !important;
    color: rgb(203 213 225) !important;
}

.product-assets-upload .filepond--drop-label label {
    padding: 0 !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

.product-assets-upload .filepond--list-scroller {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    order: 2 !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    padding-top: 0.25rem !important;
    overflow: visible !important;
}

.product-assets-upload .filepond--list {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    transform: none !important;
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--list {
    position: relative !important;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 7.75rem !important;
    grid-template-columns: none !important;
    gap: 0.85rem !important;
    width: max-content !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 7.75rem !important;
    transform: none !important;
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--list-scroller {
    order: 1 !important;
    width: max-content !important;
    max-width: calc(100% - 8.6rem) !important;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label {
    order: 2 !important;
    width: 7.75rem !important;
    min-width: 7.75rem !important;
    height: 7.75rem !important;
    min-height: 7.75rem !important;
    flex: 0 0 7.75rem !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    text-align: center !important;
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(209 213 219);
    font-size: 2.15rem;
    font-weight: 300;
    line-height: 1;
}

.dark .product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label::before {
    color: rgb(167 139 250);
}

.product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 7.75rem !important;
    height: 7.75rem !important;
    min-width: 7.75rem !important;
    min-height: 7.75rem !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0.25rem !important;
    background: #ffffff !important;
    box-shadow:
        inset 0 0 0 1px rgb(226 232 240),
        0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.dark .product-assets-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    background: rgb(15 23 42) !important;
    box-shadow:
        inset 0 0 0 1px rgb(51 65 85),
        0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

.product-assets-image-upload .filepond--file-wrapper,
.product-assets-image-upload .filepond--file {
    height: 100% !important;
    overflow: visible !important;
}

.product-assets-image-upload .filepond--file {
    padding: 0 !important;
}

.product-assets-image-upload .product-main-image-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 110;
    border-radius: 0.25rem 0 0.25rem 0;
    background: rgb(99 75 255);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    padding: 0.18rem 0.38rem;
    pointer-events: none;
}

.product-assets-image-upload .filepond--file [data-align*='left'] {
    left: auto !important;
    right: 0.65rem !important;
}

.product-assets-image-upload .filepond--file [data-align*='right'] {
    right: 0.65rem !important;
}

.product-assets-image-upload .filepond--file [data-align*='top'] {
    top: 0.65rem !important;
}

.product-assets-document-upload .filepond--drop-label {
    align-items: center !important;
    justify-content: center !important;
    min-height: 3.5rem !important;
}

.product-assets-document-upload .filepond--drop-label label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.product-assets-document-upload .filepond--drop-label label::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(209 213 219);
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-0.08em);
}

.dark .product-assets-document-upload .filepond--drop-label label::before {
    color: rgb(167 139 250);
}

.product-assets-document-upload .filepond--list-scroller {
    position: relative !important;
    order: 2 !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 1rem !important;
    overflow: visible !important;
    transform: none !important;
}

.product-assets-document-upload .filepond--list {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
    transform: none !important;
}

.product-assets-document-upload .filepond--item {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
}

