/* 
 * USER FRIENDLY STATIC DESIGN
 * ===========================
 * Comprehensive fix for:
 * - All hover effects removed
 * - High contrast for accessibility
 * - Static, clean design
 * - WCAG 2.1 AA compliant colors
 */

/* ============================================
   NUCLEAR OPTION - KILL ALL TRANSITIONS
   ============================================ */

/* Override ROOT elements first */
html,
body {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* Override EVERYTHING - including Bootstrap */
html *, 
html *::before, 
html *::after,
body *,
body *::before,
body *::after,
.card,
.btn,
.nav-link,
.dropdown-item,
.form-control,
.form-select,
a,
button,
[class*="transition"],
[class*="animate"],
[style*="transition"] {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* Preserve essential functionality */
input, textarea, select, button, a, [tabindex], [role="button"], .accordion-collapse, .collapse, .collapsing {
    pointer-events: auto !important;
}

/* Allow Bootstrap collapse to work (needed for dropdowns/accordions) */
.collapse:not(.show) {
    display: none !important;
}
.collapse.show {
    display: block !important;
}
.collapsing {
    display: block !important;
}

/* ============================================
   REMOVE ALL HOVER EFFECTS
   ============================================ */

/* Links - No color change on hover */
a:hover,
a:focus,
a:active {
    color: inherit !important;
    background-color: transparent !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Buttons - Completely static */
.btn:hover,
.btn:focus,
.btn:active,
button:hover,
button:focus,
button:active {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}

/* Primary buttons stay blue */
.btn-primary:hover,
.btn-primary:focus {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}

/* Secondary buttons stay gray */
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

/* Success buttons stay green */
.btn-success:hover,
.btn-success:focus {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

/* Outline buttons stay static */
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: transparent !important;
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Cards - No lift or shadow change */
.card:hover,
.card:focus-within {
    transform: none !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    border-color: inherit !important;
}

/* State cards - static */
.state-card:hover,
.state-preview-card:hover,
.document-card:hover,
.feature-card:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: inherit !important;
    border-color: inherit !important;
}

/* Navigation links - static */
.nav-link:hover,
.navbar-nav .nav-link:hover,
.nav-item:hover {
    background-color: transparent !important;
    transform: none !important;
}

/* Dropdown items - static */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    transform: none !important;
}

/* List items - static */
.list-group-item:hover,
.list-group-item-action:hover {
    background-color: #f8f9fa !important;
    transform: none !important;
    z-index: auto !important;
}

/* Table rows - static */
.table-hover tbody tr:hover,
tr:hover {
    background-color: rgba(0,0,0,0.02) !important;
    transform: none !important;
}

/* Form controls - static focus */
.form-control:hover,
.form-select:hover {
    border-color: #ced4da !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* ============================================
   HIGH CONTRAST - ACCESSIBILITY FIX
   ============================================ */

/* Body text - High contrast black */
body {
    color: #212529 !important;
    background-color: #ffffff !important;
}

/* Headings - Strong contrast (for light backgrounds) */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #1a1a2e;
}

/* Headings on dark backgrounds - White text */
/* NOTE: Removed [style*="background: linear-gradient"] as it incorrectly applies to light gradients */
.state-hero h1, .state-hero h2, .state-hero h3,
.state-header-banner h1, .state-header-banner h2, .state-header-banner h3,
.hero-content h1, .hero-content h2, .hero-content h3,
.bg-primary h1, .bg-primary h2, .bg-primary h3,
.bg-dark h1, .bg-dark h2, .bg-dark h3 {
    color: #ffffff !important;
}

/* Paragraph and general text */
p, span, div, li, td, th, label {
    color: inherit;
}

/* Muted text - Darker for better contrast (WCAG AA) */
.text-muted {
    color: #495057 !important;
}

/* Secondary text - Ensure readable */
.text-secondary {
    color: #495057 !important;
}

/* Light text on dark backgrounds */
.text-white,
.btn-primary,
.btn-success,
.btn-danger,
.btn-dark,
.bg-primary,
.bg-success,
.bg-danger,
.bg-dark {
    color: #ffffff !important;
}

/* Links - High contrast blue (on light backgrounds only) */
a {
    color: #0056b3 !important;
}

a:visited {
    color: #004494 !important;
}

/* ============================================
   STATE PAGE CONTRAST FIXES
   Links and buttons on dark/gradient backgrounds
   ============================================ */

/* White text for links on dark backgrounds */
/* NOTE: Removed [style*="background: linear-gradient"] as it incorrectly applies to light gradients */
.state-hero a,
.state-header-banner a,
.hero-content a,
.bg-primary a,
.bg-dark a,
.bg-success a,
.bg-danger a,
[style*="background-color: #0056b3"] a,
[style*="background-color: #004494"] a,
.alert-info a.btn-light,
.floating-cta-btn {
    color: #ffffff !important;
}

/* Hero buttons - ensure visibility */
.hero-btn,
.hero-btn.primary,
.hero-btn.secondary,
a.hero-btn {
    color: #0056b3 !important;
}

.hero-btn.secondary,
a.hero-btn.secondary {
    color: #ffffff !important;
    background-color: transparent !important;
    border-color: #ffffff !important;
}

/* Floating CTA button on state pages */
.floating-cta-btn,
a.floating-cta-btn {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%) !important;
}

/* State header banner links and text */
.state-header-banner,
.state-header-banner h1,
.state-header-banner p,
.state-header-banner span,
.state-header-banner .badge {
    color: #ffffff !important;
}

/* State hero sections */
.state-hero,
.state-hero h1,
.state-hero p,
.state-hero span,
.state-hero .state-badge {
    color: #ffffff !important;
}

/* btn-light on dark backgrounds should be readable */
.btn-light,
a.btn-light {
    color: #0056b3 !important;
    background-color: #ffffff !important;
}

/* Alert with CTA - Skip to Generator button */
.alert-info .btn-light,
.alert a.btn-light {
    color: #0056b3 !important;
    background-color: #ffffff !important;
}

/* Card text */
.card-title {
    color: #1a1a2e !important;
}

.card-text {
    color: #495057 !important;
}

/* Ensure navbar text is visible */
.navbar-light .navbar-nav .nav-link {
    color: #212529 !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
}

/* Footer text - ensure readable */
footer, 
footer p,
footer a,
.footer-text {
    color: inherit !important;
}

/* Placeholder text - Darker */
::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

/* Badge text contrast */
.badge {
    font-weight: 600 !important;
}

.badge.bg-light {
    color: #212529 !important;
}

/* Alert text contrast */
.alert {
    color: inherit !important;
}

.alert-primary {
    color: #084298 !important;
    background-color: #cfe2ff !important;
}

.alert-success {
    color: #0f5132 !important;
    background-color: #d1e7dd !important;
}

.alert-warning {
    color: #664d03 !important;
    background-color: #fff3cd !important;
}

.alert-danger {
    color: #842029 !important;
    background-color: #f8d7da !important;
}

.alert-info {
    color: #055160 !important;
    background-color: #cff4fc !important;
}

/* ============================================
   CLEAN STATIC DESIGN
   ============================================ */

/* Cards - Clean borders */
.card {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Consistent button styling */
.btn {
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
}

/* Form inputs - Clean look */
.form-control,
.form-select {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 0.625rem 0.875rem !important;
    background-color: #fff !important;
    color: #212529 !important;
}

/* Tables - Clean styling */
.table {
    color: #212529 !important;
}

.table th {
    font-weight: 600 !important;
    color: #1a1a2e !important;
    background-color: #f8f9fa !important;
}

.table td {
    color: #495057 !important;
}

/* Breadcrumbs - High contrast */
.breadcrumb-item a {
    color: #0056b3 !important;
}

.breadcrumb-item.active {
    color: #495057 !important;
}

/* ============================================
   FOCUS STATES - ACCESSIBILITY
   ============================================ */

/* Visible focus for keyboard navigation */
*:focus {
    outline: 2px solid #0056b3 !important;
    outline-offset: 2px !important;
}

/* Skip focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none !important;
}

/* Keyboard focus - visible outline */
*:focus-visible {
    outline: 2px solid #0056b3 !important;
    outline-offset: 2px !important;
}

/* Form focus */
.form-control:focus,
.form-select:focus {
    outline: none !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25) !important;
}

/* Button focus */
.btn:focus,
button:focus {
    outline: 2px solid #0056b3 !important;
    outline-offset: 2px !important;
}

/* ============================================
   SPECIFIC PAGE FIXES
   ============================================ */

/* State landing pages */
.state-lease-card:hover,
.state-info-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Document wizard */
.wizard-step:hover,
.wizard-card:hover {
    transform: none !important;
    background-color: inherit !important;
}

/* Clause builder */
.clause-card:hover,
.addendum-card:hover {
    transform: none !important;
    border-color: inherit !important;
}

/* Landing page sections */
.feature-box:hover,
.benefit-card:hover,
.cta-section:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Blog cards */
.blog-card:hover,
.post-card:hover {
    transform: none !important;
}

/* Icon containers */
.icon-box:hover,
.icon-circle:hover {
    transform: none !important;
    background-color: inherit !important;
}

/* Accordion headers */
.accordion-button:hover {
    background-color: inherit !important;
    color: inherit !important;
}

.accordion-button:not(.collapsed):hover {
    background-color: #e7f1ff !important;
}

/* ============================================
   OVERRIDE INLINE STYLES
   ============================================ */

/* Force override any inline hover styles */
[style*="hover"],
[onmouseover],
[onmouseout] {
    transition: none !important;
}

/* Disable CSS-based hover effects from inline styles */
.hover-effect,
.hover-lift,
.hover-shadow,
.hover-scale {
    transform: none !important;
    box-shadow: inherit !important;
}

/* ============================================
   WIZARD FORM STATIC OVERRIDES
   ============================================ */

/* Auto-save indicator - make static without animations */
.auto-save-indicator {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

.auto-save-indicator.show {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

/* Draft recovery - no animation */
.draft-recovery {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Wizard buttons - ensure they are stable and clickable */
.btn-next,
.btn-prev,
.btn-submit,
.wizard-form-section button,
button[data-action="next"],
button[data-action="prev"],
button[data-action="submit"] {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

/* Autosave notification */
.autosave-notification {
    transition: none !important;
    animation: none !important;
}

/* Progress bar in wizards */
.wizard-progress,
.wizard-progress-bar,
.progress-bar {
    transition: none !important;
    animation: none !important;
}

/* Disable slideDown animation keyframes effect */
@keyframes slideDown {
    from { opacity: 1 !important; transform: none !important; }
    to { opacity: 1 !important; transform: none !important; }
}
