@import url("./history-skeleton.css");

/* PDF Splitter Upload History, shared without app-specific restyling. */
#history-modal { z-index: 2000 !important; }
#delete-confirm-modal { z-index: 2100 !important; }
#history-modal-content, #delete-confirm-modal-content { max-width: 560px; width: min(92vw, 560px); }
#history-modal .app-modal-content, #delete-confirm-modal .app-modal-content {
    background-color: white; padding: 2rem; border-radius: .5rem; max-height: 90vh; color: #000;
}
#history-modal .flexpromptheading {
    color: black; font-weight: bold; font-size: 1.25rem; line-height: 1.75rem;
    padding: .25rem .125rem; margin: 0 0 1rem;
}
.dark #history-modal .flexpromptheading { color: white; }
.dark #history-modal .app-modal-content, .dark #delete-confirm-modal .app-modal-content { background-color: #1a1a1a; color: #fff; }
@media (max-width: 480px) { #history-modal-content { padding: 1rem !important; } }
.history-item { cursor: default; }
.history-item-main { min-width: 0; }
.history-item-actions { display: flex; align-items: center; gap: .9rem; margin-left: 1rem; flex-shrink: 0; }
.history-item-action-btn {
    color: #9ca3af; border: none; background: transparent; width: 2rem; height: 2rem;
    padding: .25rem; border-radius: 9999px; display: inline-flex; align-items: center;
    justify-content: center; transition: color .2s ease, background-color .2s ease; cursor: pointer;
}
.history-item-action-btn:hover { background-color: #e5e7eb; }
.history-download-btn:hover { color: #2563eb; }
.history-delete-btn:hover { color: #ef4444; }
.history-item:hover { background-color: #f3f4f6; }
.dark .history-item:hover { background-color: #2d3748; color: white; }
.dark .history-item-action-btn:hover { background-color: #4b5563; }
.dark .history-download-btn:hover { color: #60a5fa; }
.dark .history-delete-btn:hover { color: #f87171; }
.dark .history-item { color: white; }

/* The original template's Tailwind utilities, scoped for apps without Tailwind. */
:is(#history-modal, #delete-confirm-modal) .flex { display: flex; }
:is(#history-modal, #delete-confirm-modal) .items-center { align-items: center; }
:is(#history-modal, #delete-confirm-modal) .justify-between { justify-content: space-between; }
:is(#history-modal, #delete-confirm-modal) .justify-end { justify-content: flex-end; }
:is(#history-modal, #delete-confirm-modal) .gap-4 { gap: 1rem; }
#history-modal .flex-grow { flex-grow: 1; }
#history-modal .min-w-0 { min-width: 0; }
#history-modal .cursor-pointer { cursor: pointer; }
#history-modal .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#history-modal .font-medium { font-weight: 500; }
#history-modal .p-2 { padding: .5rem; }
#history-modal .p-4 { padding: 1rem; }
#history-modal .rounded-md { border-radius: .375rem; }
#history-modal .relative { position: relative; }
#history-modal .mb-3 { margin-bottom: .75rem; }
:is(#history-modal, #delete-confirm-modal) .mb-4 { margin-bottom: 1rem; }
#delete-confirm-modal .mb-6 { margin-bottom: 1.5rem; }
#history-modal .text-right { text-align: right; }
#history-modal .text-center { text-align: center; }
:is(#history-modal, #delete-confirm-modal) .text-xs { font-size: .75rem; line-height: 1rem; }
:is(#history-modal, #delete-confirm-modal) .text-sm { font-size: .875rem; line-height: 1.25rem; }
#delete-confirm-modal .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
#delete-confirm-modal .font-bold { font-weight: 700; }
#history-modal .text-gray-400 { color: #9ca3af; }
#history-modal .text-gray-500 { color: #6b7280; }
:is(#history-modal, #delete-confirm-modal) .text-gray-600 { color: #4b5563; }
#history-modal .w-full { width: 100%; }
#history-modal .border { border: 1px solid #e5e7eb; }
#history-search { box-sizing: border-box; font: inherit; padding-right: 2.5rem; }
#history-modal .w-5 { width: 1.25rem; }
#history-modal .h-5 { height: 1.25rem; }
#history-modal .absolute { position: absolute; top: 50%; right: .75rem; transform: translateY(-50%); pointer-events: none; }
#history-list { overflow-y: auto; max-height: 60vh; }
#history-list > * + * { margin-top: .5rem; }
#history-modal .button-container { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.5rem; }
:is(#history-modal, #delete-confirm-modal) .btn {
    padding: .5rem 1rem; border-radius: .375rem; border: none; cursor: pointer;
    font-weight: 500; transition: background-color .2s;
}
:is(#history-modal, #delete-confirm-modal) .bg-red-600 { background: #dc2626; }
:is(#history-modal, #delete-confirm-modal) .bg-red-600:hover { background: #b91c1c; }
:is(#history-modal, #delete-confirm-modal) .text-white { color: white; }
#delete-cancel-btn { background: #e5e7eb; color: #000; }
#delete-cancel-btn:hover { background: #d1d5db; }
#history-cancel-btn { background: transparent; color: inherit; }
.dark #history-cancel-btn:hover { background: #dc2626; }
.dark #history-modal .text-gray-600, .dark #delete-confirm-modal .text-gray-600 { color: #d1d5db; }
.dark #history-modal .text-gray-500 { color: #9ca3af; }
.dark #history-search { background: white; color: #111827; border-color: #4b5563; }
.dark #delete-cancel-btn { background: #4b5563; color: white; }
.dark #delete-cancel-btn:hover { background: #6b7280; }
#delete-confirm-spinner {
    display: inline-block; margin-left: .5rem; width: 1rem; height: 1rem; border: 2px solid white;
    border-top-color: transparent; border-radius: 9999px; animation: history-spin 1s linear infinite;
}
@keyframes history-spin { to { transform: rotate(360deg); } }
