/* Core Variables */
:root {
    --texas-red: #BF0A30;
    --texas-blue: #002868;
    --texas-white: #FFFFFF;
    --texas-sand: #F4D03F;
    --sidebar-width: 280px;
    --header-height: 60px;
    --text-dark: #2D3748;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --background-light: #F7FAFC;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    background: var(--background-light);
    margin: 0;
    padding: 0;
}

.email-obfuscated {
    white-space: nowrap;
}

.email-decoy {
    display: none;
}

/* Layout Structure */
.documentation-container {
    position: relative;
    min-height: 100vh;
    display: flex;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes highlightFade {
    0% { background-color: rgba(0, 40, 104, 0.2); }
    100% { background-color: transparent; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading Indicator */
.content-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--texas-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error States */
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--texas-red);
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-message h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.reload-button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--texas-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reload-button:hover {
    background-color: #001f4d;
}

/* Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
}

/* Lone Star Hosting Chat Widget */
#lsh-launcher {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 999998;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: var(--texas-red);
    color: var(--texas-white);
    box-shadow: 0 18px 40px -12px rgba(191, 10, 48, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#lsh-launcher:hover,
#lsh-launcher:focus-visible {
    background: #9d0828;
    box-shadow: 0 20px 44px -14px rgba(191, 10, 48, 0.65);
    color: var(--texas-white);
    transform: translateY(-2px);
}

#lsh-launcher:focus-visible {
    outline: 3px solid rgba(244, 208, 63, 0.75);
    outline-offset: 3px;
}

#lsh-launcher svg {
    width: 26px;
    height: 26px;
}

#lsh-overlay {
    position: fixed;
    right: 1.5rem;
    bottom: 6rem;
    z-index: 999999;
    width: 360px;
    max-width: calc(100vw - 2rem);
    background: var(--texas-white);
    border: 1px solid rgba(0, 40, 104, 0.12);
    border-radius: 15px;
    box-shadow: 0 18px 40px -12px rgba(0, 40, 104, 0.35);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#lsh-overlay.lsh-open {
    display: flex;
}

.lsh-header {
    background: linear-gradient(135deg, var(--texas-blue), #0b3a80);
    color: var(--texas-white);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lsh-header h2 {
    margin: 0;
    color: var(--texas-white);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.lsh-header p {
    margin: 0.15rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.lsh-close {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    line-height: 0;
    padding: 0.25rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.lsh-close:hover,
.lsh-close:focus-visible {
    color: var(--texas-white);
    transform: scale(1.05);
}

.lsh-body {
    padding: 1.15rem 1.25rem 1.25rem;
    background: var(--background-light);
}

.lsh-step-label {
    margin: 0 0 0.85rem;
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lsh-dept-grid {
    display: grid;
    gap: 0.65rem;
}

.lsh-dept-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    background: var(--texas-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lsh-dept-btn:hover,
.lsh-dept-btn:focus-visible {
    border-color: var(--texas-blue);
    box-shadow: 0 8px 18px rgba(0, 40, 104, 0.1);
    transform: translateX(2px);
}

.lsh-dept-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(0, 40, 104, 0.08);
    color: var(--texas-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lsh-dept-sub {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-light);
    font-size: 0.74rem;
    font-weight: 500;
}

.lsh-field {
    margin-bottom: 0.8rem;
}

.lsh-field label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

.lsh-field input,
.lsh-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--texas-white);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.88rem;
}

.lsh-field input:focus,
.lsh-field textarea:focus {
    outline: none;
    border-color: var(--texas-blue);
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.14);
}

.lsh-field textarea {
    min-height: 76px;
    resize: vertical;
}

.lsh-back {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0 0.9rem;
    background: transparent;
    border: 0;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.78rem;
}

.lsh-back:hover,
.lsh-back:focus-visible {
    color: var(--texas-red);
}

.lsh-submit {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.78rem;
    background: var(--texas-blue);
    border: 0;
    border-radius: 8px;
    color: var(--texas-white);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: background 0.18s ease, transform 0.18s ease;
}

.lsh-submit:hover,
.lsh-submit:focus-visible {
    background: var(--texas-red);
    transform: translateY(-1px);
}

.lsh-submit:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.lsh-error {
    display: none;
    margin: -0.35rem 0 0.8rem;
    color: #b3261e;
    font-size: 0.78rem;
}

.lsh-error.lsh-show {
    display: block;
}

@media (max-width: 768px) {
    #lsh-launcher {
        right: 1rem;
        bottom: 1rem;
    }

    #lsh-overlay {
        right: 1rem;
        bottom: 5.5rem;
        max-width: calc(100vw - 2rem);
    }
}