/**
 * Kolaras Hulchal - Reset & Accessibility Helper CSS
 *
 * @package Kolaras_Hulchal
 * @version 1.0.0
 */

/* 1. Box Sizing & Root Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--kh-bg-body, #F8FAFC);
    color: var(--kh-text-main, #0F172A);
    font-family: var(--kh-font-body, 'Noto Sans Devanagari', sans-serif);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 2. Accessible Skip-to-Content Link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--kh-red-primary, #D90429);
    color: var(--kh-text-inverse, #FFFFFF);
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    font-weight: 700;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 3px solid var(--kh-navy-dark, #0B132B);
    outline-offset: 2px;
}

/* 3. Screen Reader Text Helper Class */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* 4. High-Visibility Keyboard Focus-Visible Outlines (WCAG 2.2 AA) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--kh-red-primary, #D90429) !important;
    outline-offset: 3px !important;
}

/* Remove default blur outline when clicked via mouse/touch */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}
