/* Demandas Manager - Stitch Design System Companion CSS */
/* Tailwind handles most styling - this file covers extras */

/* Material Symbols default settings */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* App container - fullscreen */
.dm-app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #faf8ff;
}

/* Main content scroll */
.dm-app > div.ml-64 {
    overflow-y: auto;
    height: 100vh;
}

/* Manrope for headlines */
.font-manrope,
.dm-app h1,
.dm-app h2,
.dm-app h3 {
    font-family: 'Manrope', sans-serif;
}

/* Ghost border utility */
.ghost-border {
    outline: 1px solid rgba(195, 198, 214, 0.15);
}

/* Glass card utility */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Nav active state */
.dm-nav-active {
    color: #003d9b !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    border-radius: 0.5rem;
    transform: translateX(4px);
}

/* Smooth view transitions */
.dm-view {
    animation: dmFadeIn 0.2s ease-out;
}

@keyframes dmFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accordion animation */
.dm-accordion-content {
    overflow: hidden;
}

.dm-accordion-arrow {
    transition: transform 0.2s ease;
}

/* Panel slide animation */
#dm-panel-content {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar styling for chat */
#dm-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#dm-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#dm-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(195, 198, 214, 0.3);
    border-radius: 4px;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive sidebar */
@media (max-width: 1023px) {
    #dm-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    #dm-sidebar.dm-sidebar-open {
        transform: translateX(0);
    }

    .dm-app > div.ml-64 {
        margin-left: 0 !important;
    }

    #dm-mobile-menu {
        display: flex !important;
    }
}

@media (min-width: 1024px) {
    #dm-mobile-menu {
        display: none !important;
    }
}

/* Reset WordPress defaults dentro do app */
.dm-app * {
    box-sizing: border-box;
}

.dm-app img:not([class*="w-"]):not([class*="h-"]) {
    max-width: 100%;
    height: auto;
}

.dm-app a {
    text-decoration: none;
    color: inherit;
}

.dm-app button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Preserva background dos botões com classes Tailwind */
.dm-app button[class*="bg-"] {
    /* Tailwind bg classes devem funcionar */
}

/* Só reseta background de botões SEM classe bg */
.dm-app button:not([class*="bg-"]):not([type="submit"]) {
    background: none;
}

.dm-app input,
.dm-app select,
.dm-app textarea {
    outline: none;
    font-family: inherit;
}

.dm-app p {
    margin: 0;
}

.dm-app h1,
.dm-app h2,
.dm-app h3,
.dm-app h4,
.dm-app h5 {
    margin: 0;
    line-height: 1.2;
}

/* Toast slide-in animation */
@keyframes dmSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-in {
    animation: dmSlideIn 0.3s ease-out;
}

/* Calendar timeline scrollbar */
#dm-calendario .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

#dm-calendario .overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

#dm-calendario .overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(195, 198, 214, 0.3);
    border-radius: 4px;
}

/* Nova mensagem aparece com animação */
.dm-chat-new {
    animation: dmChatPop 0.3s ease-out;
}

@keyframes dmChatPop {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat status dot pulse */
#dm-chat-status.bg-green-500 {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: dmDotPulse 2s infinite;
}

@keyframes dmDotPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Unread message shake animation */
@keyframes dmShake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-12deg); }
    20% { transform: rotate(12deg); }
    30% { transform: rotate(-10deg); }
    40% { transform: rotate(10deg); }
    50% { transform: rotate(-6deg); }
    60% { transform: rotate(6deg); }
    70% { transform: rotate(0deg); }
}

.dm-shake {
    animation: dmShake 1.5s ease-in-out infinite;
    transform-origin: center bottom;
}

/* Upload dropzone active state */
#dm-upload-dropzone.dragover {
    border-color: #003d9b;
    background: rgba(0, 61, 155, 0.05);
}

/* Hide WordPress admin bar */
#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}
