/* Custom styles for Call Analyzer */

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Drag and drop area */
.drop-zone {
    transition: all 0.3s ease;
}

.drop-zone.dragover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Result formatting */
.prose p {
    margin-bottom: 0.75rem;
    line-height: 1.625;
}

.prose ul,
.prose ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose li {
    margin-bottom: 0.25rem;
}

.prose strong {
    color: #f9fafb;
}

/* Dialog formatting */
.dialog-content p {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    background: rgba(55, 65, 81, 0.5);
}

.dialog-content p:has(strong:first-child) {
    border-left: 3px solid #3b82f6;
}

/* Details/Summary styling */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid #374151;
}

/* Hover effect for collapsed sections */
.bg-gray-750 {
    background-color: rgba(55, 65, 81, 0.5);
}

/* Scrollbar styling - Dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ==================== LIGHT THEME ==================== */
html.light body {
    background-color: #f3f4f6 !important;
}

html.light nav {
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
}

html.light nav a,
html.light nav button {
    color: #374151 !important;
}

html.light nav a:hover,
html.light nav button:hover {
    color: #111827 !important;
}

html.light .bg-gray-800 {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html.light .bg-gray-700 {
    background-color: #f3f4f6 !important;
}

html.light .bg-gray-900 {
    background-color: #f3f4f6 !important;
}

html.light .text-white {
    color: #111827 !important;
}

html.light .text-gray-300,
html.light .text-gray-400 {
    color: #4b5563 !important;
}

html.light .text-gray-500 {
    color: #6b7280 !important;
}

html.light .border-gray-600,
html.light .border-gray-700 {
    border-color: #e5e7eb !important;
}

html.light .prose strong {
    color: #111827 !important;
}

html.light .dialog-content p {
    background: rgba(243, 244, 246, 0.8) !important;
}

html.light details[open] summary {
    border-color: #e5e7eb !important;
}

html.light .bg-gray-750 {
    background-color: rgba(243, 244, 246, 0.8) !important;
}

html.light input,
html.light textarea {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

html.light input::placeholder {
    color: #9ca3af !important;
}

html.light .drop-zone {
    border-color: #d1d5db !important;
    background-color: #f9fafb !important;
}

html.light .drop-zone:hover {
    border-color: #9ca3af !important;
}

html.light .drop-zone.dragover {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Light theme scrollbar */
html.light ::-webkit-scrollbar-track {
    background: #f3f4f6;
}

html.light ::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

html.light ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Error block light theme */
html.light .bg-red-900\/50 {
    background-color: rgba(254, 226, 226, 0.8) !important;
}

html.light .text-red-200 {
    color: #991b1b !important;
}

html.light .border-red-500 {
    border-color: #ef4444 !important;
}

/* History page light theme */
html.light a.block.bg-gray-800:hover {
    background-color: #f9fafb !important;
}

/* Login page light theme */
html.light .bg-gray-700 {
    background-color: #f9fafb !important;
}

html.light label.text-gray-300 {
    color: #374151 !important;
}

html.light button.focus\:ring-offset-gray-800 {
    --tw-ring-offset-color: #ffffff !important;
}

/* Transition for smooth theme switching */
body,
nav,
.bg-gray-800,
.bg-gray-700,
.bg-gray-900,
input,
.drop-zone {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Audio player styling */
audio {
    height: 40px;
    border-radius: 8px;
}

audio::-webkit-media-controls-panel {
    background-color: #374151;
}

html.light audio::-webkit-media-controls-panel {
    background-color: #e5e7eb;
}

/* Delete confirmation modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1f2937;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html.light .modal-content {
    background: #ffffff;
}

/* Delete button on history page */
.delete-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.history-item:hover .delete-btn {
    opacity: 1;
}
