/* Custom styles to complement Bootstrap dark theme */
/* Following Replit styling guidelines - minimal custom overrides */

:root {
    --trademark-primary: #007bff;
    --trademark-success: #28a745;
    --trademark-warning: #ffc107;
    --trademark-danger: #dc3545;
    --trademark-info: #17a2b8;
}

/* Custom animations for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse 1.5s infinite;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--bs-success);
}

.status-indicator.pending {
    background-color: var(--bs-warning);
}

.status-indicator.error {
    background-color: var(--bs-danger);
}

.status-indicator.inactive {
    background-color: var(--bs-secondary);
}

/* Custom card hover effects */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Similarity score styling */
.similarity-score {
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.similarity-score.high {
    color: var(--bs-danger);
}

.similarity-score.medium {
    color: var(--bs-warning);
}

.similarity-score.low {
    color: var(--bs-info);
}

/* DMCA notice styling */
.dmca-content {
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 400px;
    overflow-y: auto;
}

.dmca-content h2, 
.dmca-content h3, 
.dmca-content h4, 
.dmca-content h5, 
.dmca-content h6 {
    color: var(--bs-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Chart container styling */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Loading spinner for async operations */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Trademark serial number styling */
.serial-number {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--bs-info);
}

/* Infringement severity badges */
.severity-critical {
    background-color: var(--bs-danger) !important;
    animation: pulse 2s infinite;
}

.severity-high {
    background-color: var(--bs-warning) !important;
}

.severity-medium {
    background-color: var(--bs-info) !important;
}

.severity-low {
    background-color: var(--bs-secondary) !important;
}

/* Custom progress indicators */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* Modal enhancements */
.modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Table enhancements */
.table-responsive {
    border-radius: 0.375rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Form enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom range slider */
.form-range::-webkit-slider-thumb {
    background-color: var(--bs-primary);
}

.form-range::-moz-range-thumb {
    background-color: var(--bs-primary);
    border: none;
}

/* Alert enhancements */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-primary {
    border-left-color: var(--bs-primary);
}

.alert-success {
    border-left-color: var(--bs-success);
}

.alert-warning {
    border-left-color: var(--bs-warning);
}

.alert-danger {
    border-left-color: var(--bs-danger);
}

.alert-info {
    border-left-color: var(--bs-info);
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Government-style pricing tables */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: #ffffff;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.pricing-table th {
    background-color: #1a4480;
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid #ddd;
}

.pricing-table td {
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #ddd;
    background-color: #ffffff;
}

.pricing-table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.schedule-title {
    font-size: 28px;
    font-weight: bold;
    color: #1a4480;
    text-align: center;
    margin-bottom: 10px;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.effective-date {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 5px;
}

.issued-under {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #1a4480;
    padding-bottom: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group-vertical .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .pricing-table {
        font-size: 0.9rem;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 8px 5px;
    }

    .schedule-title {
        font-size: 24px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }

    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    .table {
        border-collapse: collapse;
    }

    .table th,
    .table td {
        border: 1px solid #000;
    }
}

/* Accessibility enhancements */
.skip-link {
    background: #162e51;
    color: #fff;
    min-height: 44px;
    padding: 0.75rem 1rem;
    position: absolute;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
}

.skip-link:focus {
    top: 1rem;
}

.usa-button,
button,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
}

.usa-nav__link {
    min-height: 44px;
}

.usa-logo {
    min-height: 44px;
}

.usa-logo:focus,
.usa-nav__link:focus,
.skip-link:focus,
.usa-button:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #2491ff;
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .loading-pulse,
    .severity-critical {
        animation: none;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] {
    --bs-border-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-gray-800) !important;
    color: var(--bs-gray-100) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--bs-gray-100) !important;
}

/* Custom scrollbar for dark theme */
[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}
