/* --- Custom Styles for Voice Calling Dashboard --- */

:root {
    --transition-speed: 0.3s;
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
.dark ::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Theme transition */
body {
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Dark mode form controls (textarea + container surfaces) */
.dark textarea {
    background-color: #334155;
    color: #e2e8f0;
    border-color: #475569;
}
.dark textarea::placeholder,
.dark input::placeholder,
.dark select::placeholder {
    color: #94a3b8;
}
.dark .bg-surface-container-lowest {
    background-color: #1e293b;
    color: #e2e8f0;
}
.dark .bg-surface-container-low {
    background-color: #1e293b;
    color: #e2e8f0;
}

/* Modal Overlay Base */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity var(--transition-speed) var(--ease-out-quad);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Box Container */
.modal-box {
    background-color: #ffffff;
    border: 1px solid rgba(229, 231, 235, 1);
    border-radius: 1.25rem;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform var(--transition-speed) var(--ease-out-back), opacity var(--transition-speed) var(--ease-out-quad);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dark .modal-box {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Badges */
.badge-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.tag-int {
    background-color: rgba(0, 106, 101, 0.15);
    color: #006a65;
}
.dark .tag-int {
    background-color: rgba(85, 218, 209, 0.2);
    color: #55dad1;
}

.tag-noint {
    background-color: rgba(226, 45, 45, 0.1);
    color: #bd0917;
}
.dark .tag-noint {
    background-color: rgba(255, 180, 172, 0.2);
    color: #ffb4ac;
}

.tag-cbk {
    background-color: rgba(0, 98, 159, 0.1);
    color: #00629f;
}
.dark .tag-cbk {
    background-color: rgba(155, 203, 255, 0.2);
    color: #9bcbff;
}

.tag-fail {
    background-color: rgba(186, 26, 26, 0.1);
    color: #ba1a1a;
}
.dark .tag-fail {
    background-color: rgba(255, 218, 214, 0.2);
    color: #ffdad6;
}

/* Call Detail transcript style */
.transcript-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid #edeeef;
}
.dark .transcript-container {
    background-color: #0f172a;
    border-color: #1e293b;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    position: relative;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.chat-bubble-agent {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}
.dark .chat-bubble-agent {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

.chat-bubble-user {
    align-self: flex-end;
    background-color: #bd0917;
    color: #ffffff;
    border-bottom-right-radius: 0.25rem;
}
.dark .chat-bubble-user {
    background-color: #be0a18;
}

/* Copied toast indicator */
#toast-host {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background-color: #1e293b;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}
.dark .toast {
    background-color: #f1f5f9;
    color: #0f172a;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Sparkline elements */
.sparkline-svg {
    stroke-width: 2;
    fill: none;
}

/* Pulse animation for active call */
@keyframes pulse-custom {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.pulse-active {
    animation: pulse-custom 1.5s infinite;
}

/* Custom interactive effects */
.hover-scale {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

/* Micro animations for side navigation */
.nav-link {
    transition: all 0.2s ease;
}
.nav-link:hover {
    transform: translateX(3px);
}
