/**
 * Support System - Custom Styles
 *
 * KreativeStudio Colors:
 * Primary: #af1e61 (deep pink)
 * Secondary: #e1314a (coral red)
 */

:root {
    --ks-primary: #af1e61;
    --ks-primary-dark: #8f1951;
    --ks-primary-light: #cf3e81;
    --ks-secondary: #e1314a;
    --ks-secondary-dark: #c1213a;
    --ks-secondary-light: #f1516a;
    --ks-gradient-start: #af1e61;
    --ks-gradient-end: #e1314a;
}

/* Dark mode styles */
.dark {
    color-scheme: dark;
}

.dark body {
    background-color: #111827;
    color: #f3f4f6;
}

/* Dark mode toggle button */
#dark-mode-toggle {
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

#dark-mode-toggle:hover {
    transform: scale(1.05);
}

#dark-mode-toggle:active {
    transform: scale(0.95);
}

/* Pulse animation for theme toggle */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(175, 30, 97, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(175, 30, 97, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(175, 30, 97, 0);
    }
}

#dark-mode-toggle.pulse {
    animation: pulse 0.5s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: var(--ks-primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ks-primary);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--ks-primary);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--ks-primary-dark);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

/* Custom focus styles */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-opacity-50;
    --tw-ring-color: var(--ks-primary);
}

/* Custom button styles */
.btn-gradient {
    background: linear-gradient(to right, var(--ks-gradient-start), var(--ks-gradient-end));
    color: white;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(175, 30, 97, 0.25);
}

.btn-gradient:hover {
    background: linear-gradient(to right, var(--ks-primary-dark), var(--ks-secondary-dark));
    box-shadow: 0 6px 8px rgba(175, 30, 97, 0.3);
    transform: translateY(-1px);
}

.btn-gradient:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(175, 30, 97, 0.3);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transition: opacity 0.3s ease-in-out;
    font-weight: 500;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: var(--ks-secondary);
    color: white;
}

.toast-info {
    background-color: var(--ks-primary);
    color: white;
}

/* Form validation styles */
.input-error {
    border-color: var(--ks-secondary);
}

.input-error:focus {
    border-color: var(--ks-secondary);
    box-shadow: 0 0 0 3px rgba(225, 49, 74, 0.3);
}

.error-message {
    color: var(--ks-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Ticket status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.375rem;
}

.status-open {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-open::before {
    background-color: #3b82f6;
}

.status-in_progress {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-in_progress::before {
    background-color: #f59e0b;
}

.status-waiting {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-waiting::before {
    background-color: #ef4444;
}

.status-resolved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-resolved::before {
    background-color: #10b981;
}

.status-closed {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-closed::before {
    background-color: #6b7280;
}

/* Priority badges */
.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-low {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.priority-medium {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.priority-high {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.priority-urgent {
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* Knowledge base article styles */
.article-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--ks-primary);
}

.article-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
    color: var(--ks-primary);
}

.article-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: var(--ks-primary);
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-content ul, .article-content ol {
    margin-bottom: 1rem;
    margin-left: 1.5rem;
    line-height: 1.6;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content a {
    color: var(--ks-primary);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.article-content a:hover {
    color: var(--ks-secondary);
}

.article-content blockquote {
    border-left: 4px solid var(--ks-primary-light);
    padding-left: 1rem;
    font-style: italic;
    margin: 1rem 0;
    color: #4b5563;
}

.article-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875em;
}

.dark .article-content code {
    background-color: #374151;
}

.article-content pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.875em;
}

.dark .article-content pre {
    background-color: #374151;
}

/* Additional article content styles for TinyMCE elements */
.article-content strong, .article-content b {
    font-weight: 700;
}

.article-content em, .article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid #e5e7eb;
}

.dark .article-content table {
    border-color: #374151;
}

.article-content th, .article-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.dark .article-content th, .dark .article-content td {
    border-bottom-color: #374151;
}

.article-content th {
    background-color: #f9fafb;
    font-weight: 600;
}

.dark .article-content th {
    background-color: #374151;
}

/* Custom form elements */
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--ks-primary);
    box-shadow: 0 0 0 3px rgba(175, 30, 97, 0.2);
}

/* Custom card styles */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dark .card {
    background-color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .btn-gradient {
        padding: 0.375rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ==============================
   ARTICLE CONTENT FORMATTING
   ============================== */

/* Article Content Styling */
.article-content {
    line-height: 1.7;
    font-size: 16px;
}

.article-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: #111827;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    color: #111827;
    line-height: 1.4;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #111827;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.875rem 0 0.5rem 0;
    color: #111827;
    line-height: 1.4;
}

.article-content h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    color: #111827;
    line-height: 1.4;
}

.article-content h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    color: #111827;
    line-height: 1.4;
}

.article-content p {
    margin: 0.75rem 0;
    line-height: 1.7;
    color: #374151;
}

.article-content ul {
    list-style-type: disc;
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content ol {
    list-style-type: decimal;
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #374151;
}

.article-content ul ul,
.article-content ol ol {
    margin: 0.25rem 0;
}

.article-content strong,
.article-content b {
    font-weight: 600;
    color: #111827;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 4px solid var(--ks-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content code {
    background: #f3f4f6;
    color: #e11d48;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
}

.article-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-content th {
    background: #f9fafb;
    color: #111827;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content a {
    color: var(--ks-primary);
    text-decoration: underline;
    text-decoration-color: rgba(175, 30, 97, 0.3);
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--ks-primary-dark);
    text-decoration-color: rgba(143, 25, 81, 0.5);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}







/* Dark Mode Styles for Article Content */
.dark .article-content h1,
.dark .article-content h2,
.dark .article-content h3,
.dark .article-content h4,
.dark .article-content h5,
.dark .article-content h6 {
    color: #f9fafb;
}

.dark .article-content p,
.dark .article-content li {
    color: #d1d5db;
}

.dark .article-content strong,
.dark .article-content b {
    color: #f9fafb;
}

.dark .article-content blockquote {
    background: #374151;
    color: #9ca3af;
    border-left-color: var(--ks-primary);
}

.dark .article-content code {
    background: #374151;
    color: #fbbf24;
}

.dark .article-content table {
    background: #1f2937;
}

.dark .article-content th {
    background: #374151;
    color: #f9fafb;
    border-bottom-color: #4b5563;
}

.dark .article-content td {
    color: #d1d5db;
    border-bottom-color: #4b5563;
}

.dark .article-content a {
    color: var(--ks-primary-light);
}

.dark .article-content a:hover {
    color: var(--ks-secondary-light);
}

/* Support card styles */
.support-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 1);
    transition: all 0.3s ease;
}

.support-card:hover {
    border-color: var(--ks-primary) !important;
    box-shadow: 0 4px 12px rgba(175, 30, 97, 0.15);
}

.dark .support-card {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 1);
}

.dark .support-card:hover {
    border-color: var(--ks-primary) !important;
    box-shadow: 0 4px 12px rgba(175, 30, 97, 0.25);
}

/* Home quick link cards */
.home-quick-link {
    transition: all 0.3s ease;
}

.home-quick-link:hover {
    border-color: var(--ks-primary) !important;
    box-shadow: 0 4px 12px rgba(175, 30, 97, 0.15);
}

.dark .home-quick-link:hover {
    border-color: var(--ks-primary) !important;
    box-shadow: 0 4px 12px rgba(175, 30, 97, 0.25);
}

/* Glass card styles */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 231, 235, 0.8);
    position: relative;
    z-index: 1;
}

.dark .glass-card {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.8);
}

/* Remove any potential overlay effects on click */
.glass-card::before,
.glass-card::after {
    display: none !important;
}

/* Prevent unwanted overlay effects on click */
.cursor-pointer {
    outline: none !important;
}

.cursor-pointer:focus {
    outline: none !important;
    box-shadow: none !important;
}

.cursor-pointer:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Prevent backdrop filter issues on click */
.backdrop-blur-sm {
    backdrop-filter: none !important;
}

/* Remove any browser default overlay on clickable elements */
div[onclick] {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    outline: none !important;
}

div[onclick]:focus {
    outline: none !important;
    box-shadow: none !important;
}

div[onclick]:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Disable text selection on clickable cards and labels */
.ticket-card,
.support-card,
.cursor-pointer,
.filter-btn,
.stat-card {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hide white rectangle artifacts behind stat cards */
.stat-card {
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.stat-card > div {
    position: relative;
    z-index: 3;
}

.stat-card::before,
.stat-card::after,
.stat-card > div::before,
.stat-card > div::after {
    display: none !important;
}

/* Force no background bleed-through */
.stat-card * {
    background-clip: border-box !important;
}

/* Remove text selection highlight */
.ticket-card::selection,
.support-card::selection,
.cursor-pointer::selection,
.filter-btn::selection,
.stat-card::selection {
    background: transparent !important;
}

.ticket-card::-moz-selection,
.support-card::-moz-selection,
.cursor-pointer::-moz-selection,
.filter-btn::-moz-selection,
.stat-card::-moz-selection {
    background: transparent !important;
}

/* Modern Pagination Styles */
.pagination-container {
    backdrop-filter: blur(10px);
}

.pagination-number.active {
    background: linear-gradient(135deg, var(--ks-primary), var(--ks-secondary));
    box-shadow: 0 4px 12px rgba(175, 30, 97, 0.3);
}

.pagination-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* My Tickets Filter Styles */
.filter-btn.active {
    background: linear-gradient(135deg, var(--ks-primary), var(--ks-secondary)) !important;
    color: white !important;
    border-color: var(--ks-primary) !important;
    box-shadow: 0 2px 8px rgba(175, 30, 97, 0.3);
}

.dark .filter-btn.active {
    box-shadow: 0 2px 8px rgba(175, 30, 97, 0.4);
}

.stat-card.active {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(175, 30, 97, 0.2);
}

.dark .stat-card.active {
    box-shadow: 0 8px 25px rgba(175, 30, 97, 0.3);
}

/* Filter transition effects */
.filter-btn {
    transition: all 0.3s ease;
}

.stat-card {
    transition: all 0.3s ease;
}

/* ==============================
   EMAIL NOTIFICATIONS CARD
   ============================== */

/* CSS removido - tudo agora é inline para evitar conflitos */

/* ==============================
   ARTICLE ICON FIXES
   ============================== */

/* Ensure article icons maintain proper size and don't get compressed */
.article-icon-container {
    min-width: 3rem !important;
    min-height: 3rem !important;
    width: 3rem !important;
    height: 3rem !important;
    flex-shrink: 0 !important;
}

.article-icon-container svg {
    min-width: 1.5rem !important;
    min-height: 1.5rem !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    flex-shrink: 0 !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
    .article-icon-container {
        min-width: 2.5rem !important;
        min-height: 2.5rem !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .article-icon-container svg {
        min-width: 1.25rem !important;
        min-height: 1.25rem !important;
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* Additional safety for flex containers with article icons */
.flex.items-center:has(.article-icon-container) {
    align-items: flex-start !important;
}

@media (min-width: 641px) {
    .flex.items-center:has(.article-icon-container) {
        align-items: center !important;
    }
}

/* Ensure the title container takes available space */
.article-icon-container + div {
    flex: 1 1 auto;
    min-width: 0;
}

