"""CSS styles for the Quran Aligner Gradio interface.""" from config import ( ANIM_WORD_COLOR, QURAN_TEXT_SIZE_PX, ARABIC_WORD_SPACING, MEGA_TEXT_SIZE_DEFAULT, MEGA_LINE_SPACING_DEFAULT, MEGA_WORD_SPACING_DEFAULT, MEGA_SURAH_LIGATURE_SIZE, ) from data.font_data import DIGITAL_KHATT_FONT_B64, SURAH_NAME_FONT_B64 def build_css() -> str: """Return the complete CSS string for the Gradio interface.""" return f""" /* Font faces */ @font-face {{ font-family: 'DigitalKhatt'; src: url(data:font/otf;base64,{DIGITAL_KHATT_FONT_B64}) format('opentype'); font-weight: normal; font-style: normal; }} @font-face {{ font-family: 'SurahName'; src: url(data:font/truetype;base64,{SURAH_NAME_FONT_B64}) format('truetype'); font-weight: normal; font-style: normal; }} .arabic-text {{ font-family: 'DigitalKhatt', 'Traditional Arabic', sans-serif; direction: rtl; text-align: right; }} /* Prevent output area from being in a scrolling box */ .gradio-container .prose {{ max-height: none !important; }} .output-html {{ max-height: none !important; overflow: visible !important; }} /* Segment cards - theme adaptive */ .segment-card {{ border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; border: 2px solid; }} .segment-header {{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }} .segment-title {{ font-size: 13px; opacity: 0.9; }} .segment-badges {{ display: flex; gap: 6px; align-items: center; }} .segment-badge {{ color: white; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; }} .segment-audio {{ margin: 8px 0; display: flex; align-items: center; gap: 8px; }} .segment-audio audio {{ flex: 1; height: 32px; border-radius: 4px; }} /* Lazy play button (replaces