/**
 * OpenDyslexic Font Support for Course Bookings Registration
 * 
 * Font files location: public/fonts/dyslexie/opendyslexic-0.91.12/compiled/
 */

@font-face {
    font-family: 'OpenDyslexic';
    src: url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Regular.woff2') format('woff2'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Regular.woff') format('woff'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold.woff2') format('woff2'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold.woff') format('woff'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Italic.woff2') format('woff2'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Italic.woff') format('woff'),
        url('/fonts/dyslexie/opendyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold-Italic.woff2') format('woff2'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold-Italic.woff') format('woff'),
        url('/fonts/dyslexie/opendyslexic-0.91.12/compiled/OpenDyslexic-Bold-Italic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Apply OpenDyslexic Font when enabled */
body.use-dyslexie-font,
body.use-dyslexie-font * {
    font-family: 'OpenDyslexic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Move reCAPTCHA badge to bottom-left, collapsed to logo only, expands on hover */
.grecaptcha-badge {
    left: 14px !important;
    right: auto !important;
    width: 70px !important;
    overflow: hidden !important;
    transition: width 0.3s ease !important;
    border-radius: 4px;
}

.grecaptcha-badge:hover {
    width: 256px !important;
}

/* Toggle Button Styling */
.dyslexie-toggle-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    transition: all 0.3s ease;
}


.dyslexie-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 30px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

.dyslexie-toggle-btn:hover {
    background: #0f172a;
    width: auto;
    padding: 0 20px;
    gap: 8px;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dyslexie-toggle-btn i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dyslexie-toggle-label {
    white-space: nowrap;
    opacity: 0;
    width: 0;
    height: auto;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.dyslexie-toggle-btn:hover .dyslexie-toggle-label {
    opacity: 1;
    width: auto;
}

/* When font is enabled, change button style */
body.use-dyslexie-font .dyslexie-toggle-btn {
    background: #059669;
    /* Success Green */
}

body.use-dyslexie-font .dyslexie-toggle-btn:hover {
    background: #047857;
}

/* Responsive Font Scaling for OpenDyslexic */
body.use-dyslexie-font h1 {
    font-size: 1.5rem !important;
}

body.use-dyslexie-font h2 {
    font-size: 1.35rem !important;
}

body.use-dyslexie-font h3 {
    font-size: 1.2rem !important;
}

body.use-dyslexie-font .display-1,
body.use-dyslexie-font .display-2,
body.use-dyslexie-font .display-3,
body.use-dyslexie-font .display-4 {
    font-size: 2rem !important;
}