/**
 * AIEDocs Document Selector & Manager - Custom Theme
 * Supports both light and dark modes with gradient effects
 * Based on SLTAI theme design system
 */

/* ====================================
   Document Selector Widget - Light Mode
   ==================================== */

.aiedocs-theme-custom .aiedocs-selector-button {
    background: transparent;
    border: transparent;
    color: var(--e-global-color-text);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aiedocs-theme-custom .aiedocs-selector-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-selector-button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.aiedocs-theme-custom .aiedocs-selector-icon {
    font-size: 18px;
}

.aiedocs-theme-custom .aiedocs-selector-text {
    color: inherit;
}

/* Modal Overlay */
.aiedocs-theme-custom.aiedocs-selector-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Modal Container */
.aiedocs-theme-custom.aiedocs-selector-modal {
    background: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-10df46a);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: var(--e-global-color-text);
}

.aiedocs-theme-custom .aiedocs-modal-content {
    padding: 24px;
}

.aiedocs-theme-custom .aiedocs-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: var(--e-global-color-text);
    font-weight: 600;
}

/* Documents List */
.aiedocs-theme-custom .aiedocs-documents-list {
    background: var(--e-global-color-secondary);
    border: 1px solid var(--e-global-color-10df46a);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.aiedocs-theme-custom .aiedocs-document-item {
    background: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-10df46a);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aiedocs-theme-custom .aiedocs-document-item:hover {
    background: var(--e-global-color-secondary);
    transform: translateX(4px);
}

.aiedocs-theme-custom .aiedocs-document-item:last-child {
    margin-bottom: 0;
}

.aiedocs-theme-custom .aiedocs-document-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #FF00FF;
}

.aiedocs-theme-custom .aiedocs-document-title {
    color: var(--e-global-color-text);
    font-weight: 500;
    flex: 1;
}

.aiedocs-theme-custom .aiedocs-document-type {
    background: var(--e-global-color-accent);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Modal Actions */
.aiedocs-theme-custom .aiedocs-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.aiedocs-theme-custom .aiedocs-modal-actions button {
    padding: 12px 24px;
    border: transparent;
    background: transparent;
    color: var(--e-global-color-text);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.aiedocs-theme-custom .aiedocs-modal-actions button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-modal-actions button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.aiedocs-theme-custom .aiedocs-modal-close:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

/* Select All/None buttons */
.aiedocs-theme-custom .aiedocs-select-all,
.aiedocs-theme-custom .aiedocs-select-none {
    background: transparent !important;
    border: transparent !important;
}

.aiedocs-theme-custom .aiedocs-select-all::after,
.aiedocs-theme-custom .aiedocs-select-none::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-select-all:hover,
.aiedocs-theme-custom .aiedocs-select-none:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

/* Scrollbar styling */
.aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar {
    width: 8px;
}

.aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar-track {
    background: var(--e-global-color-secondary);
    border-radius: 4px;
}

.aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar-thumb {
    background: var(--e-global-color-accent);
    border-radius: 4px;
}

.aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar-thumb:hover {
    background: #FF00FF;
}

/* ====================================
   Document Manager - Light Mode
   ==================================== */

.aiedocs-theme-custom.aiedocs-document-manager {
    background: var(--e-global-color-primary);
    color: var(--e-global-color-text);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--e-global-color-10df46a);
    margin: 20px 0;
}

.aiedocs-theme-custom.aiedocs-document-manager h2 {
    color: var(--e-global-color-text);
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
}

/* Upload Section */
.aiedocs-theme-custom .aiedocs-upload-section {
    margin-bottom: 24px;
}

.aiedocs-theme-custom .aiedocs-upload-toggle {
    background: transparent;
    border: transparent;
    color: var(--e-global-color-text);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.aiedocs-theme-custom .aiedocs-upload-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-upload-toggle:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.aiedocs-theme-custom .aiedocs-upload-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Upload Form */
.aiedocs-theme-custom .aiedocs-upload-form-wrapper {
    background: var(--e-global-color-secondary);
    border: 1px solid var(--e-global-color-10df46a);
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

.aiedocs-theme-custom .aiedocs-form-field {
    margin-bottom: 16px;
}

.aiedocs-theme-custom .aiedocs-form-field label {
    display: block;
    color: var(--e-global-color-text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.aiedocs-theme-custom .aiedocs-form-field input[type="text"],
.aiedocs-theme-custom .aiedocs-form-field input[type="file"],
.aiedocs-theme-custom .aiedocs-form-field select {
    width: 100%;
    background: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-10df46a);
    color: var(--e-global-color-text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.aiedocs-theme-custom .aiedocs-form-field input[type="file"] {
    padding: 8px;
}

.aiedocs-theme-custom .aiedocs-form-field .description {
    color: var(--e-global-color-text);
    opacity: 0.7;
    font-size: 12px;
    margin-top: 4px;
}

.aiedocs-theme-custom .aiedocs-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.aiedocs-theme-custom .aiedocs-form-actions .button-primary {
    background: transparent;
    border: transparent;
    color: var(--e-global-color-text);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.aiedocs-theme-custom .aiedocs-form-actions .button-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-form-actions .button-primary:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.aiedocs-theme-custom .aiedocs-form-actions .button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message styling */
.aiedocs-theme-custom .aiedocs-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.aiedocs-theme-custom .aiedocs-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.aiedocs-theme-custom .aiedocs-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
}

/* Documents Section */
.aiedocs-theme-custom .aiedocs-documents-section {
    background: var(--e-global-color-secondary);
    border: 1px solid var(--e-global-color-10df46a);
    border-radius: 8px;
    padding: 20px;
}

.aiedocs-theme-custom .aiedocs-documents-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.aiedocs-theme-custom .aiedocs-documents-actions select,
.aiedocs-theme-custom .aiedocs-documents-actions .button {
    background: transparent;
    border: transparent;
    color: var(--e-global-color-text);
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.aiedocs-theme-custom .aiedocs-documents-actions .button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-documents-actions .button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

/* Documents Table */
.aiedocs-theme-custom .aiedocs-documents-table {
    width: 100%;
    border-collapse: collapse;
}

.aiedocs-theme-custom .aiedocs-documents-table thead {
    background: var(--e-global-color-accent);
}

.aiedocs-theme-custom .aiedocs-documents-table th {
    padding: 12px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 13px;
    /*
    border-bottom: 2px solid var(--e-global-color-10df46a);
    */
}

.aiedocs-theme-custom .aiedocs-documents-table tbody tr {
    /*
    border-bottom: 1px solid var(--e-global-color-10df46a);
    */
}

.aiedocs-theme-custom .aiedocs-documents-table tbody tr:hover {
    background: rgba(255, 0, 255, 0.05);
}

.aiedocs-theme-custom .aiedocs-documents-table td {
    padding: 10px 12px;
    color: var(--e-global-color-text);
    font-size: 13px;
}

.aiedocs-theme-custom .aiedocs-documents-table input[type="text"],
.aiedocs-theme-custom .aiedocs-documents-table select {
    background: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-10df46a);
    color: var(--e-global-color-text);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.aiedocs-theme-custom .aiedocs-documents-table input[type="text"]:hover,
.aiedocs-theme-custom .aiedocs-documents-table select:hover {
    background: var(--e-global-color-secondary);
}

.aiedocs-theme-custom .aiedocs-documents-table input[type="text"]:focus,
.aiedocs-theme-custom .aiedocs-documents-table select:focus {
    outline: none;
    border-color: #FF00FF;
}

/* Success state */
.aiedocs-theme-custom .aiedocs-field-success,
.aiedocs-theme-custom .aiedocs-documents-table .aiedocs-field-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-color: #28a745 !important;
    transition: all 0.3s ease;
}

.aiedocs-theme-custom .aiedocs-documents-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF00FF;
}

/* Status badges */
.aiedocs-theme-custom .aiedocs-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.aiedocs-theme-custom .aiedocs-status.status-processed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.aiedocs-theme-custom .aiedocs-status.status-pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.aiedocs-theme-custom .aiedocs-status.status-processing {
    background: linear-gradient(90deg, rgba(255, 0, 255, 0.2), rgba(0, 237, 255, 0.2));
    color: #FF00FF;
    animation: pulse 1.5s ease-in-out infinite;
}

.aiedocs-theme-custom .aiedocs-status.status-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Action buttons
.aiedocs-theme-custom .aiedocs-actions {
    display: flex;
    gap: 6px;
}
*/

.aiedocs-theme-custom .aiedocs-actions .button {
    background: transparent;
    border: transparent;
    color: var(--e-global-color-text);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.aiedocs-theme-custom .aiedocs-actions .button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(23deg,#FBE240 -6.07%,#FF00FF 54.55%,#00EDFF 117.66%);
    z-index: 1;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
}

.aiedocs-theme-custom .aiedocs-actions .button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

/* Spinner */
.aiedocs-theme-custom .spinner {
    border: 2px solid var(--e-global-color-10df46a);
    border-top-color: #FF00FF;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: none;
}

.aiedocs-theme-custom .spinner.is-active {
    display: inline-block;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* No items message */
.aiedocs-theme-custom .no-items {
    text-align: center;
    color: var(--e-global-color-text);
    font-style: italic;
    opacity: 0.7;
}

/* ====================================
   Shared Documents Styling - Light Mode
   ==================================== */

/* Shared document indicators in selector */
.aiedocs-theme-custom .aiedocs-document-shared {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 237, 255, 0.1)) !important;
    border-left: 3px solid #FF00FF;
    padding-left: 9px;
}

.aiedocs-theme-custom .aiedocs-document-shared:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 237, 255, 0.2)) !important;
}

.aiedocs-theme-custom .aiedocs-shared-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #FF00FF;
    font-weight: 600;
}

/* Shared document rows in manager */
.aiedocs-theme-custom .aiedocs-document-shared-row {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.05), rgba(0, 237, 255, 0.05));
    position: relative;
}

.aiedocs-theme-custom .aiedocs-document-shared-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #FF00FF, #00EDFF);
}

.aiedocs-theme-custom .aiedocs-document-shared-row:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 237, 255, 0.1));
}

/* Shared badge styling */
.aiedocs-theme-custom .aiedocs-shared-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(90deg, #FF00FF, #00EDFF);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 600;
}

/* Disabled controls for shared documents */
.aiedocs-theme-custom .aiedocs-document-shared-row input[disabled],
.aiedocs-theme-custom .aiedocs-document-shared-row select[disabled] {
    background: var(--e-global-color-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

.aiedocs-theme-custom .aiedocs-document-shared-row button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.aiedocs-theme-custom .aiedocs-document-shared-row input[type="checkbox"][disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ====================================
   Dark Mode Overrides
   ==================================== */

/* Document Selector - Dark Mode */
.dark .aiedocs-theme-custom .aiedocs-selector-button {
    background: transparent;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-selector-button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    -webkit-text-fill-color: white !important;
}

.dark .aiedocs-theme-custom.aiedocs-selector-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.dark .aiedocs-theme-custom.aiedocs-selector-modal {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-modal-content h3 {
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-documents-list {
    background: #222222;
    border-color: #444;
}

.dark .aiedocs-theme-custom .aiedocs-document-item {
    background: #2a2a2a;
    border-color: #444;
}

.dark .aiedocs-theme-custom .aiedocs-document-item:hover {
    background: #333;
}

.dark .aiedocs-theme-custom .aiedocs-document-title {
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-document-type {
    background: linear-gradient(90deg, #FF00FF, #00EDFF);
}

.dark .aiedocs-theme-custom .aiedocs-modal-actions button {
    background: transparent;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-modal-actions button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.dark .aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.dark .aiedocs-theme-custom .aiedocs-documents-list::-webkit-scrollbar-thumb {
    background: #FF00FF;
}

/* Document Manager - Dark Mode */
.dark .aiedocs-theme-custom.aiedocs-document-manager {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

.dark .aiedocs-theme-custom.aiedocs-document-manager h2 {
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-upload-toggle {
    background: transparent;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-upload-form-wrapper {
    background: #222222;
    border-color: #444;
}

.dark .aiedocs-theme-custom .aiedocs-form-field label {
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-form-field input[type="text"],
.dark .aiedocs-theme-custom .aiedocs-form-field input[type="file"],
.dark .aiedocs-theme-custom .aiedocs-form-field select {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-form-field .description {
    color: rgba(255, 255, 255, 0.7);
}

.dark .aiedocs-theme-custom .aiedocs-form-actions .button-primary {
    background: transparent;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-documents-section {
    background: #222222;
    border-color: #444;
}

.dark .aiedocs-theme-custom .aiedocs-documents-actions select,
.dark .aiedocs-theme-custom .aiedocs-documents-actions .button {
    background: #1a1a1a;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-documents-actions .button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.dark .aiedocs-theme-custom .aiedocs-documents-table thead {
    background: linear-gradient(90deg, #FF00FF, #00EDFF);
}

.dark .aiedocs-theme-custom .aiedocs-documents-table tbody tr {
    border-color: #444;
}

.dark .aiedocs-theme-custom .aiedocs-documents-table tbody tr:hover {
    background: rgba(255, 0, 255, 0.1);
}

.dark .aiedocs-theme-custom .aiedocs-documents-table td {
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-documents-table input[type="text"],
.dark .aiedocs-theme-custom .aiedocs-documents-table select {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-documents-table input[type="text"]:hover,
.dark .aiedocs-theme-custom .aiedocs-documents-table select:hover {
    background: #333;
}

.dark .aiedocs-theme-custom .aiedocs-field-success,
.dark .aiedocs-theme-custom .aiedocs-documents-table .aiedocs-field-success {
    background-color: rgba(40, 167, 69, 0.2) !important;
    color: #5cb85c !important;
    border-color: #28a745 !important;
}

.dark .aiedocs-theme-custom .aiedocs-actions .button {
    background: transparent;
    border: transparent;
    color: white;
}

.dark .aiedocs-theme-custom .aiedocs-actions .button:hover {
    background: linear-gradient(62deg, #F0F -16.63%, #00EDFF 101.52%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.dark .aiedocs-theme-custom .spinner {
    border-color: #444;
    border-top-color: #FF00FF;
}

.dark .aiedocs-theme-custom .no-items {
    color: rgba(255, 255, 255, 0.7);
}

/* Shared Documents - Dark Mode */
.dark .aiedocs-theme-custom .aiedocs-document-shared {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 237, 255, 0.2)) !important;
    border-left-color: #FF00FF;
}

.dark .aiedocs-theme-custom .aiedocs-document-shared:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 237, 255, 0.3)) !important;
}

.dark .aiedocs-theme-custom .aiedocs-shared-indicator {
    color: #FF00FF;
}

.dark .aiedocs-theme-custom .aiedocs-document-shared-row {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 237, 255, 0.1));
}

.dark .aiedocs-theme-custom .aiedocs-document-shared-row:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15), rgba(0, 237, 255, 0.15));
}

.dark .aiedocs-theme-custom .aiedocs-document-shared-row input[disabled],
.dark .aiedocs-theme-custom .aiedocs-document-shared-row select[disabled] {
    background: #111;
    color: rgba(255, 255, 255, 0.5);
}

/* ====================================
   Mobile Responsive
   ==================================== */

@media (max-width: 768px) {
    .aiedocs-theme-custom .aiedocs-selector-button {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .aiedocs-theme-custom .aiedocs-modal-content {
        padding: 20px;
    }
    
    .aiedocs-theme-custom .aiedocs-documents-list {
        max-height: 320px;
    }
    
    .aiedocs-theme-custom.aiedocs-document-manager {
        padding: 16px;
    }
    
    .aiedocs-theme-custom .aiedocs-documents-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .aiedocs-theme-custom .aiedocs-documents-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .aiedocs-theme-custom .aiedocs-selector-button {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .aiedocs-theme-custom .aiedocs-selector-icon {
        font-size: 14px;
    }
    
    .aiedocs-theme-custom .aiedocs-modal-content h3 {
        font-size: 18px;
    }
    
    .aiedocs-theme-custom .aiedocs-document-type {
        display: block;
        margin-top: 6px;
        display: inline-block;
    }
    
    .aiedocs-theme-custom.aiedocs-document-manager h2 {
        font-size: 20px;
    }
    
    .aiedocs-theme-custom .aiedocs-documents-actions {
        flex-wrap: wrap;
    }
    
    .aiedocs-theme-custom .aiedocs-shared-badge {
        display: block;
        margin-top: 4px;
        margin-left: 0;
    }
}

.aiedocs-theme-custom .aiedocs-selector-icon {
    height: 24px !important;
}

.aiedocs-theme-custom .aiedocs-frontend-delete { 
    min-height: 25px;
}

.aiedocs-selector-widget {
	margin: 0 !important;
}