/**
 * DME Token Ecosystem - Accessibility CSS
 * Enhances the platform with styling for screen reader and accessibility support
 */

/* Hide elements visually but keep them accessible to screen readers */
.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;
}

/* Visible focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #8bc53f !important;
    outline-offset: 2px !important;
}

/* Skip to main content link - completely hidden as requested */
.skip-to-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* High contrast mode adjustments */
@media (forced-colors: active) {
    .btn,
    .nav-link,
    .action-button {
        forced-color-adjust: none;
    }
}

/* Improved form field accessibility */
.form-control,
.btn {
    transition: all 0.2s ease-in-out;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
}

/* Screen reader announcements area */
#screen-reader-announcements {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
    aria-live: polite;
}

/* Enhanced focus for wallet address display */
.wallet-address {
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
}

.wallet-address:focus-within {
    border-color: #8bc53f;
    box-shadow: 0 0 0 2px rgba(139, 197, 63, 0.25);
}

/* Enhance visibility for token balance */
.token-balance {
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Better visibility for form feedback */
.message {
    border-left-width: 4px;
    padding-left: 15px;
}

.message.success {
    border-left-color: #28a745;
}

.message.error {
    border-left-color: #dc3545;
}

/* Improved tab navigation */
.tab {
    position: relative;
    overflow: hidden;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Improved modal accessibility */
.modal-form {
    border: 2px solid #8bc53f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* WHITEPAPER CONTENT TEXT ONLY - BLACK TEXT */
/* FINAL SOLUTION - TARGET EXACT WHITEPAPER CONTENT */
.whitepaper-content p,
.whitepaper-content div,
.whitepaper-content span,
.whitepaper-section p,
.whitepaper-section div:not(.section-title),
.whitepaper-section span:not(.section-title *),
.token-info,
.token-info *,
.highlighted,
.token-address {
    color: #333333 !important;
    background-color: transparent !important;
}

/* ENSURE HEADERS STAY GREEN */
.section-title,
.section-title *,
.whitepaper-nav,
.whitepaper-nav *,
.nav-links,
.nav-links *,
h1, h2, h3, h4, h5, h6 {
    color: #6ABC44 !important;
}

/* ENSURE CHATBOT BUTTON SIZE CONSISTENCY ACROSS ALL PAGES */
.chatbot-button {
    width: 64px !important;
    height: 64px !important;
}

.chatbot-button i {
    font-size: 28px !important;
}

/* Only fix paragraph content, preserve all headings and styling */
.whitepaper-container .whitepaper-content p,
.whitepaper-container .whitepaper-content div:not(.whitepaper-section-header),
.whitepaper-container .whitepaper-content span:not(.section-title),
.whitepaper-container .whitepaper-content li,
.whitepaper-section .whitepaper-content p,
.whitepaper-section .whitepaper-content div:not(.whitepaper-section-header),
.whitepaper-section .whitepaper-content span:not(.section-title),
.whitepaper-section .whitepaper-content li,
.token-info p,
.token-info div:not(.token-title),
.token-info span:not(.token-title),
.vesting-table td,
.vesting-table th,
#overview p,
#overview .whitepaper-content,
#overview .whitepaper-content p,
#overview .whitepaper-content div,
#overview .whitepaper-content span,
#tokenomics .whitepaper-content p,
#vesting .whitepaper-content p,
#platform .whitepaper-content p,
#utility .whitepaper-content p,
#roadmap .whitepaper-content p,
#governance .whitepaper-content p,
#company .whitepaper-content p,
#social .whitepaper-content p {
    color: #333333 !important;
}

/* ENSURE LOGIN PAGE VISIBILITY */
.login-container {
    background-color: white !important;
    color: #333333 !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3) !important;
}

.login-container * {
    color: #333333 !important;
}

.login-container .login-title {
    color: #333333 !important;
}

.login-container .login-subtitle {
    color: #6c757d !important;
}

.login-container .alert {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #333333 !important;
}

/* ENSURE SOCIAL MEDIA ICONS ARE WHITE */
.social-icon {
    color: white !important;
}

.social-icon i {
    color: white !important;
}

.social-icon:hover {
    color: white !important;
}

.social-icon:hover i {
    color: white !important;
}

/* FIX CONTRAST ISSUES IDENTIFIED IN PAGESPEED REPORT */

/* Fix navigation link contrast */
.nav-link.active {
    color: #ffffff !important;
    background-color: #6ABC44 !important;
}

/* Fix search container text contrast - the "Cannot scan QR code" text */
.search-info,
.search-info span {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    border: 1px solid #ddd !important;
}

/* Fix newsletter button contrast */
.newsletter-button {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

/* Fix purchase form text contrast - make them readable without white boxes */
.purchase-form-container small.text-muted {
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 4px !important;
    font-weight: 600 !important;
}

.token-shop-container small.payment-info,
.payment-info {
    color: #ffffff !important;
    background-color: transparent !important;
    padding: 4px !important;
    font-weight: 600 !important;
}

/* Fix buy button contrast */
.buy-button {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

/* Fix disclaimer text contrast - the purchase agreement text */
.disclaimer,
.purchase-disclaimer,
.terms-text,
.agreement-text {
    color: #000000 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
}

/* Fix contact button contrast */
.contact-btn {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

/* Fix cookie consent button contrast */
.cookie-accept {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

/* Ensure sufficient contrast for all text on body */
body {
    color: #333333 !important;
}

/* Fix any remaining low contrast elements */
.text-muted {
    color: #495057 !important;
}

small {
    color: #495057 !important;
}

/* Fix all button contrast issues identified in PageSpeed audit */
.newsletter-button,
.buy-button,
.contact-btn,
.cookie-btn,
.cookie-accept,
.cookie-customize,
.cookie-save,
#newsletter-submit,
#buy-button,
#submitBtn,
#cookie-accept-btn,
#cookie-customize-btn,
button[type="submit"],
input[type="submit"],
.submit-btn,
.contact-submit {
    color: #ffffff !important;
    background-color: #6ABC44 !important;
    border: 2px solid #6ABC44 !important;
}

/* Specific cookie button styling fixes */
.cookie-customize {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

.cookie-accept {
    background-color: #6ABC44 !important;
    color: #ffffff !important;
    border: 2px solid #6ABC44 !important;
}

/* H1 SIZE FORCE FIX FOR RECURRING ISSUE */
.hero-title,
.hero-title .text-reveal,
h1.hero-title {
    font-size: 2.5rem !important;
    font-size: clamp(2.1rem, 4vw, 2.8rem) !important;
}

/* Enhance readability */
body {
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}