.td-deal-media-upload-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px dashed rgba(72, 78, 96, 0.22);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.98)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 36%);
    padding: 1.25rem;
    min-height: 100%;
}

.td-deal-media-upload-shell.is-enhanced .td-deal-media-fallback,
.td-deal-media-upload-shell.is-enhanced .td-deal-media-fallback-submit {
    display: none !important;
}

.td-deal-media-uploader {
    min-height: clamp(20rem, 48vh, 28rem);
}

.td-deal-media-uploader .uppy-Dashboard-inner {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 1rem;
    border-color: rgba(72, 78, 96, 0.18);
}

.td-deal-media-uploader .uppy-Dashboard-AddFiles {
    border-radius: 0.9rem;
}

.td-deal-media-uploader .uppy-Dashboard-innerWrap,
.td-deal-media-uploader .uppy-Dashboard-content,
.td-deal-media-uploader .uppy-Dashboard-AddFiles {
    min-height: inherit;
}

.td-deal-media-card {
    border: 1px solid rgba(72, 78, 96, 0.14);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.04);
}

.td-deal-media-card__preview {
    border-radius: 0.9rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(241, 245, 249, 1));
}

.td-deal-media-card__preview img {
    display: block;
    width: 100%;
    height: auto;
}

.td-deal-media-summary {
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 1));
}

.td-deal-media-table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #786850;
    border-bottom-color: rgba(72, 78, 96, 0.12);
}

.td-deal-media-table tbody td {
    vertical-align: middle;
    border-top-color: rgba(72, 78, 96, 0.08);
}

.td-deal-media-table__type {
    min-width: 9rem;
}

.td-deal-media-type-chip {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(72, 78, 96, 0.12);
    background: rgba(248, 250, 252, 1);
}

.td-deal-media-type-chip svg {
    width: 1.25rem;
    height: 1.25rem;
}

.td-deal-media-name-input {
    max-width: 100%;
}

.td-deal-media-visibility {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.35rem;
}

.td-deal-media-visibility .form-check-label {
    font-size: 0.95rem;
}

.td-deal-media-visibility__state {
    align-self: flex-start;
}

.td-deal-media-title-editor {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
}

.td-deal-media-title-editor.is-editing {
    align-items: stretch;
}

.td-deal-media-title-editor__edit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.td-deal-media-title-display {
    cursor: text;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.25rem 0;
    line-height: 1.3;
    word-break: break-word;
}

.td-deal-media-title-input {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
}

.td-deal-media-title-save {
    flex: 0 0 auto;
    white-space: nowrap;
}

.td-deal-media-title-save.is-loading {
    opacity: 0.75;
    cursor: wait;
}

.td-deal-media-modal__panel {
    width: min(100% - 32px, 1120px);
}

.td-deal-media-modal__footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
}

.td-media-actions-item {
    display: flex;
    align-items: center;
    width: 100%;
    white-space: nowrap;
}

.td-media-actions-item:hover,
.td-media-actions-item:focus {
    background: rgba(248, 250, 252, 1);
}

.td-media-actions-menu {
    z-index: 1200 !important;
}

@media (max-width: 767.98px) {
    .td-deal-media-uploader {
        min-height: 18rem;
    }

    .td-deal-media-upload-shell {
        padding: 1rem;
    }

    .td-deal-media-modal__panel {
        width: calc(100% - 16px);
    }
}

@media (max-width: 575.98px) {
    .td-deal-media-upload-shell {
        gap: 0.85rem;
    }

    .td-deal-media-table thead {
        display: none;
    }

    .td-deal-media-table tbody tr {
        display: block;
        border: 1px solid rgba(72, 78, 96, 0.12);
        border-radius: 1rem;
        overflow: hidden;
        margin-bottom: 1rem;
        background: #fff;
    }

    .td-deal-media-table tbody td {
        display: block;
        width: 100%;
        border-top: 0;
        padding: 0.9rem 1rem;
    }

    .td-deal-media-table tbody td[data-td-media-cell="actions"] {
        border-top: 1px solid rgba(72, 78, 96, 0.08);
    }

    .td-deal-media-table__type {
        min-width: 0;
    }

    .td-deal-media-modal__footer {
        padding-top: 0.85rem;
    }
}
