/* ============================================
   TALEY DESIGN SYSTEM - UTILITIES
   Forms, Language Switcher, Mobile Nav, Helpers
============================================ */

/* FORMS MOVED TO components/forms.css */

/* ============================================
   LANGUAGE SWITCHER (UX-006 Fix - More Visible)
============================================ */

.language-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 16px;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    background: var(--gray-50);
    border-radius: 20px;
    border: 1px solid var(--gray-200);
    gap: 4px;
}

/* Globe icon before switcher */
.language-switcher::before {
    content: '🌍';
    font-size: 14px;
    margin-right: 4px;
}

.language-switcher a {
    text-decoration: none;
    color: var(--gray-400);
    transition: color 0.2s ease;
    padding: 2px 6px;
    border-radius: 12px;
}

.language-switcher a:hover {
    color: var(--green-primary);
    background: rgba(76, 175, 80, 0.1);
}

.language-switcher a.active {
    color: var(--gray-900);
    font-weight: 700;
    background: var(--white);
    pointer-events: none;
}

.language-switcher span {
    color: var(--gray-400);
    margin: 0 2px;
    font-size: 12px;
}

/* ============================================
   MOBILE HAMBURGER MENU
============================================ */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-900);
    margin: 3px 0;
    transition: all 0.3s var(--transition-smooth);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s var(--transition-smooth);
    /* Ensure solid background on mobile for readability */
    z-index: 1000;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-200);
    /* Ensure 44px min touch target */
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-nav a:hover {
    color: var(--green-primary);
}

/* ============================================
   LEGAL PAGE SPECIFIC ELEMENTS
   (Moved to components/legal.css)
============================================ */

/* ============================================
   HELPER CLASSES
============================================ */

.hidden {
    display: none !important;
}

/* Screen Reader Only - visually hidden but accessible (UX-007) */
.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;
}

/* ============================================
   STORY RESULT (Restored)
============================================ */
.story-result {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px dashed var(--gray-200);
    text-align: center;
    animation: fadeInSlide 0.6s ease;
}

.story-content h3 {
    font-size: 20px;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.story-content p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
}

.story-audio-placeholder {
    background: var(--gray-50);
    border-radius: 50px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: default;
}

.audio-wave {
    display: flex;
    gap: 3px;
    align-items: center;
    height: 20px;
}

.audio-wave span {
    display: block;
    width: 3px;
    background: var(--green-light);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.audio-wave span:nth-child(1) {
    height: 10px;
    animation-delay: 0.1s;
}

.audio-wave span:nth-child(2) {
    height: 16px;
    animation-delay: 0.2s;
}

.audio-wave span:nth-child(3) {
    height: 8px;
    animation-delay: 0.3s;
}

.audio-wave span:nth-child(4) {
    height: 14px;
    animation-delay: 0.4s;
}

.audio-wave span:nth-child(5) {
    height: 6px;
    animation-delay: 0.5s;
}

.result-cta p {
    font-size: 14px;
    margin-bottom: 8px;
    font-style: normal;
}

.text-link {
    color: var(--orange-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--orange-hover);
    text-decoration: underline;
}