/* Dossiê Moraes - Main Styles */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@700&family=Teko:wght@700&display=swap');

/* Typography */
body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
    line-height: 1.6;
    background-color: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
    --tw-text-opacity: 1;
    color: rgb(31 41 55 / var(--tw-text-opacity, 1));
}

.font-mono {
    font-family: 'Roboto Mono', 'Monaco', 'Menlo', monospace;
}

/* Custom Colors */
:root {
    --color-primary: #dc2626;
    /* red-600 */
    --color-primary-hover: #b91c1c;
    /* red-700 */
    --color-secondary: #2563eb;
    /* blue-600 */
    --color-secondary-hover: #1d4ed8;
    /* blue-700 */
    --color-success: #059669;
    /* green-600 */
    --color-warning: #d97706;
    /* amber-600 */
    --color-danger: #dc2626;
    /* red-600 */
    --color-bg-page: #f9fafb;
    /* gray-50 */
    --font-sans: "Codec Cold Extra-Bold", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background-color: #dc2626;
    /* red-600 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #b91c1c;
    /* red-700 */
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #2563eb;
    /* blue-600 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #1d4ed8;
    /* blue-700 */
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #d1d5db;
    /* gray-300 */
    background-color: white;
    color: #374151;
    /* gray-700 */
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline:hover {
    border-color: #9ca3af;
    /* gray-400 */
    background-color: #f9fafb;
    /* gray-50 */
}

/* CTA Buttons */
.cta-petition {
    transition: all 0.3s ease;
}

.cta-petition:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.cta-assinar {
    transition: all 0.3s ease;
}

.cta-assinar:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

/* Cards */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    /* gray-200 */
}

.card-body {
    padding: 1rem 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    /* gray-200 */
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
    border-color: #dc2626;
    /* red-500 */
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
    border-color: #dc2626;
    /* red-500 */
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
    border-color: #dc2626;
    /* red-500 */
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    color: #dc2626;
    /* red-600 */
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.25rem;
}

.form-checkbox:focus {
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
}

.form-radio {
    width: 1rem;
    height: 1rem;
    color: #dc2626;
    /* red-600 */
    border: 1px solid #d1d5db;
    /* gray-300 */
}

.form-radio:focus {
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
}

/* Error States */
.form-error {
    border-color: #fca5a5;
    /* red-300 */
}

.form-error:focus {
    box-shadow: 0 0 0 2px #dc2626;
    /* red-500 */
    border-color: #dc2626;
    /* red-500 */
}

.error-message {
    color: #dc2626;
    /* red-600 */
    font-size: 0.875rem;
    /* text-sm */
    margin-top: 0.25rem;
}

/* Success States */
.form-success {
    border-color: #86efac;
    /* green-300 */
}

.form-success:focus {
    box-shadow: 0 0 0 2px #059669;
    /* green-500 */
    border-color: #059669;
    /* green-500 */
}

.success-message {
    color: #059669;
    /* green-600 */
    font-size: 0.875rem;
    /* text-sm */
    margin-top: 0.25rem;
}

/* Loading States */
.btn-loading {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-loading .spinner {
    display: inline-block;
}

.btn-loading .btn-text {
    opacity: 0;
}

/* Timeline Styles */
#timeline-container {
    position: relative;
}

/* Timeline vertical line for desktop */
#timeline-container::before {
    content: '';
    position: absolute;
    top: 4rem;
    left: 2.3rem;
    bottom: 0;
    width: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    z-index: 1;
}

/* Hide timeline line on mobile */
@media (max-width: 767px) {
    #timeline-container::before {
        display: none;
    }
}

/* Table specific styling */
.timeline-table {
    min-width: 100%;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.timeline-table thead {
    background-color: #f3f4f6;
    color: #4b5563;
}

.timeline-table thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 500;
}

.timeline-table thead th:first-child {
    padding-left: 6rem;
}

.timeline-table tbody {
    border-top: 1px solid #e5e7eb;
}

.timeline-table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.timeline-table tbody tr:hover {
    background-color: #f9fafb;
}

.timeline-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.timeline-table tbody td {
    padding: 1rem 1.5rem;
}

.timeline-table tbody td:first-child {
    position: relative;
    padding-left: 6rem;
    white-space: nowrap;
    font-weight: 500;
}

/* Timeline numbers */
.timeline-number {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    background-color: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

/* Mobile cards styling */
.timeline-cards {
    gap: 0.75rem;
    display: flex;
    flex-direction: column;
}

.timeline-card {
    position: relative;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    padding-left: 3rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.timeline-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.timeline-card>*+* {
    margin-top: 0.25rem;
}

.timeline-card-number {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

/* Dashboard Styles */
.stat-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 1.875rem;
    /* text-3xl */
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    /* text-sm */
    color: #4b5563;
    /* gray-600 */
}

.principle-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: box-shadow 0.15s ease;
}

.principle-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.violation-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: #fee2e2;
    /* red-100 */
    color: #991b1b;
    /* red-800 */
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

/* Table Styles */
.table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 0.75rem 1.5rem;
    background-color: #f9fafb;
    /* gray-50 */
    text-align: left;
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 500;
    color: #6b7280;
    /* gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    /* gray-200 */
}

.table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    /* text-sm */
    color: #111827;
    /* gray-900 */
    border-bottom: 1px solid #e5e7eb;
    /* gray-200 */
}

.table tbody tr:nth-child(even) {
    background-color: #f9fafb;
    /* gray-50 */
}

.table tbody tr:hover {
    background-color: #fef2f2;
    /* red-50 */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        width: 0.5rem;
        height: 0.5rem;
        left: 0.125rem;
    }

    .timeline-item::after {
        left: 0.25rem;
        width: 0.125rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .shadow {
        box-shadow: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn-primary {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}