/**
 * Accessibility Styles for MyBidhaa
 */

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: #fff;
    padding: 10px;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.accessibility-panel button {
    display: block;
    width: 40px;
    height: 40px;
    margin: 5px 0;
    border: none;
    border-radius: 4px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accessibility-panel button:hover {
    background: #e0e0e0;
}

.accessibility-panel button.active {
    background: #007bff;
    color: white;
}

.accessibility-panel.collapsed {
    width: 50px;
    height: 50px;
    overflow: hidden;
    padding: 5px;
}

.accessibility-panel.collapsed h3,
.accessibility-panel.collapsed .accessibility-buttons {
    display: none;
}

.accessibility-panel .toggle-panel {
    background: #622c84;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10000;
}

.accessibility-panel .toggle-panel:hover,
.accessibility-panel .toggle-panel:focus {
    background: #8a41bd;
    outline: none;
}

.accessibility-panel .toggle-panel i {
    font-size: 18px;
}

.accessibility-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    padding-right: 45px;
}

.accessibility-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.accessibility-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
    color: #333;
}

.accessibility-btn.active {
    background: #4CAF50;
    color: white;
}

.accessibility-btn i {
    font-size: 16px;
}

.accessibility-btn:hover {
    background: #e0e0e0;
}

.accessibility-btn.active:hover,
.accessibility-btn.active:focus {
    background: #8a41bd;
}

/* High Contrast Mode */
.high-contrast {
    --text-color: #ffffff;
    --background-color: #000000;
    --link-color: #ffff00;
}

.high-contrast body {
    background-color: var(--background-color);
    color: var(--text-color);
}

.high-contrast a {
    color: var(--link-color);
}

.high-contrast-mode {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast-mode * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

.high-contrast-mode a,
.high-contrast-mode button,
.high-contrast-mode .btn {
    background-color: #000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

.high-contrast-mode img {
    filter: grayscale(100%) contrast(200%);
}

.high-contrast-mode input,
.high-contrast-mode textarea,
.high-contrast-mode select {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

/* Large Text Mode */
.large-text {
    font-size: 120%;
}

.large-text h1 { font-size: 2.4em; }
.large-text h2 { font-size: 2em; }
.large-text h3 { font-size: 1.8em; }
.large-text h4 { font-size: 1.6em; }
.large-text h5 { font-size: 1.4em; }
.large-text h6 { font-size: 1.2em; }

.large-text-mode {
    font-size: 120% !important;
}

.large-text-mode p, 
.large-text-mode div, 
.large-text-mode span, 
.large-text-mode a, 
.large-text-mode button,
.large-text-mode input,
.large-text-mode label,
.large-text-mode h1, 
.large-text-mode h2, 
.large-text-mode h3, 
.large-text-mode h4, 
.large-text-mode h5, 
.large-text-mode h6 {
    font-size: 120% !important;
    line-height: 1.5 !important;
}

/* Focus outline for keyboard navigation */
.keyboard-focus *:focus {
    outline: 3px solid #622c84 !important;
    outline-offset: 2px !important;
}

/* Skip to main content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #622c84;
    color: white;
    padding: 8px 15px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #007bff;
    color: white;
    padding: 8px 16px;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Screen Reader Mode */
.screen-reader-mode:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Magnifier */
.magnifier {
    position: fixed;
    width: 150px;
    height: 150px;
    border: 2px solid #007bff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Accessibility Focus Styles */
:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

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

/* Show focus outline for keyboard users */
:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}