Alex Amari commited on
Commit
ea2e95c
·
1 Parent(s): d80b1a3

Restyle app to match OHA branding

Browse files
__pycache__/app.cpython-312-pytest-7.4.4.pyc CHANGED
Binary files a/__pycache__/app.cpython-312-pytest-7.4.4.pyc and b/__pycache__/app.cpython-312-pytest-7.4.4.pyc differ
 
__pycache__/app.cpython-312.pyc ADDED
Binary file (57.3 kB). View file
 
app.py CHANGED
@@ -467,12 +467,17 @@ def format_results_streaming(data, lang):
467
 
468
  """
469
 
 
 
 
 
 
470
  # Header
471
  header = f"""## {data['hospital']}
472
 
473
- ### {t['status']}: {data['eligibility_status']}
474
 
475
- 💵 Income: ${data['income']:,.0f} ({data['fpl_percentage']}% FPL)
476
 
477
  ---
478
 
@@ -483,19 +488,16 @@ def format_results_streaming(data, lang):
483
 
484
  ---
485
 
486
- 📞 Contact: **{data['contact']}**
487
 
488
  ---
489
 
490
- ### 📄 {t['sources']}
491
-
492
- 📄 Document: [**{data['hospital']} Financial Assistance Policy**]({data['fap_url']})
493
-
494
- 📄 Document: [**Connecticut Public Act 24-81**](https://www.cga.ct.gov/2024/ba/pdf/2024HB-05320-R000149-BA.pdf)
495
 
496
- 📄 Document: [**2025 Federal Poverty Level Guidelines**](https://www.healthcare.gov/glossary/federal-poverty-level-fpl/)
497
-
498
- 📄 Document: [**CT Office of the Healthcare Advocate**](https://portal.ct.gov/oha)
 
499
 
500
  ---
501
 
@@ -631,16 +633,16 @@ def stream_chat_response(message, chat_history, eligibility_data):
631
  # === CUSTOM CSS ===
632
 
633
  custom_css = """
634
- /* ===== CT.GOV / OHA Official Branding ===== */
635
 
636
- /* --- Global --- */
637
  .gradio-container {
638
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
639
- max-width: 960px !important;
 
640
  width: 100% !important;
641
  margin: 0 auto !important;
642
- padding-left: 1.5rem !important;
643
- padding-right: 1.5rem !important;
644
  background: #FFFFFF !important;
645
  color: #212529 !important;
646
  font-size: 16px !important;
@@ -649,341 +651,342 @@ custom_css = """
649
  box-sizing: border-box !important;
650
  }
651
 
652
- /* --- CT.GOV Top Bar --- */
653
- .ct-gov-bar {
654
- background: #00264D;
655
- color: #FFFFFF;
656
- font-size: 0.8rem;
657
- padding: 6px 24px;
658
- letter-spacing: 0.03em;
659
- margin: -16px -1.5rem 0 -1.5rem;
660
  }
661
- .ct-gov-bar a, .ct-gov-bar a span, .ct-gov-bar a strong {
662
- color: #FFFFFF !important;
663
- text-decoration: none;
 
 
 
 
 
 
664
  }
665
- .ct-gov-bar a:hover, .ct-gov-bar a:hover span {
666
- text-decoration: underline;
 
667
  color: #FFFFFF !important;
 
 
668
  }
 
669
 
670
- /* --- Blue Header Band --- */
671
  .oha-header {
672
- background: #003DA5;
673
- color: #FFFFFF;
674
- padding: 1.25rem 24px;
675
- margin: 0 -1.5rem 1rem -1.5rem;
676
  }
677
  .oha-header a {
678
  color: #FFFFFF !important;
679
- text-decoration: none;
680
- }
681
- .oha-header a:hover {
682
- opacity: 0.9;
683
  }
 
684
  .oha-header h1 {
685
  color: #FFFFFF !important;
686
- font-size: 1.75rem !important;
687
  font-weight: 300 !important;
688
  margin: 0 !important;
689
  padding: 0 !important;
690
  border: none !important;
691
- line-height: 1.3;
692
  }
693
  .oha-header .oha-subtitle {
694
  color: rgba(255,255,255,0.85);
695
- font-size: 0.95rem;
696
- margin-top: 0.25rem;
697
  font-weight: 400;
698
  }
699
  .oha-header .oha-beta {
700
  display: inline-block;
701
- background: rgba(255,255,255,0.2);
702
- color: #FFFFFF;
703
  padding: 2px 10px;
704
- border-radius: 3px;
705
- font-size: 0.7rem;
706
  font-weight: 600;
707
- letter-spacing: 0.08em;
708
- margin-left: 0.75rem;
709
  vertical-align: middle;
710
  }
711
 
712
- /* --- Language Toggle Row --- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  .lang-row {
714
  justify-content: flex-end !important;
715
- margin-bottom: 0.5rem !important;
716
  min-height: 0 !important;
717
  gap: 0 !important;
 
 
 
718
  }
719
 
720
- /* --- Section Cards / Groups --- */
721
  .gr-group {
722
- background: #FFFFFF !important;
723
- padding: 1.5rem !important;
724
- border-radius: 6px !important;
725
- border: 1px solid #E0E0E0 !important;
726
- box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
727
- margin-bottom: 1rem !important;
728
- width: 100% !important;
729
- box-sizing: border-box !important;
730
  }
731
 
732
- /* --- Prevent streaming reflow --- */
733
- .results-area {
734
- width: 100% !important;
735
- min-height: 400px;
736
- box-sizing: border-box !important;
737
- }
738
- .results-area .prose {
739
- overflow-wrap: break-word;
740
- word-break: break-word;
741
  }
742
 
743
- /* --- Hide invisible step groups completely --- *
744
- * When Gradio hides a Group, it may set display:none on the element
745
- * itself or on a wrapper div. The white bars come from leftover
746
- * border, padding, margin, and flex gap on those elements.
747
- * We use .step-group elem_classes to target them precisely.
748
- */
749
-
750
- /* The step-group element itself when hidden */
751
  .step-group[style*="display: none"],
752
  .step-group[style*="display:none"],
753
- .step-group.hidden,
754
- .step-group.hide {
755
- padding: 0 !important;
756
- margin: 0 !important;
757
- border: none !important;
758
- box-shadow: none !important;
759
- min-height: 0 !important;
760
- max-height: 0 !important;
761
  overflow: hidden !important;
762
  }
763
-
764
- /* The wrapper div Gradio puts around each Group */
765
  div:has(> .step-group[style*="display: none"]),
766
  div:has(> .step-group[style*="display:none"]),
767
  div:has(> .step-group.hidden),
768
  div:has(> .step-group.hide) {
769
- padding: 0 !important;
770
- margin: 0 !important;
771
- min-height: 0 !important;
772
- max-height: 0 !important;
773
- gap: 0 !important;
774
- border: none !important;
775
- box-shadow: none !important;
776
- overflow: hidden !important;
777
  display: none !important;
 
 
 
778
  }
779
-
780
- /* Catch-all: any hidden div inside the app should fully collapse */
781
  .gradio-container div[style*="display: none"],
782
  .gradio-container div[style*="display:none"] {
783
- padding: 0 !important;
784
- margin: 0 !important;
785
- border: none !important;
786
- box-shadow: none !important;
787
- max-height: 0 !important;
788
- overflow: hidden !important;
789
  }
790
 
791
- /* Eliminate flex gap contribution from hidden children */
792
- .gradio-container > div {
793
- gap: 0 !important;
794
- }
795
- .gradio-container > div > div {
796
- gap: 0 !important;
797
- }
798
-
799
- /* --- Headings --- */
800
  h1 {
801
- color: #003DA5 !important;
802
  font-weight: 300 !important;
803
  border: none !important;
804
  padding: 0 !important;
805
  }
806
  h2 {
807
- color: #003DA5 !important;
808
- font-weight: 500 !important;
809
  font-size: 1.35rem !important;
810
- border-bottom: 2px solid #E0E0E0;
811
- padding-bottom: 0.5rem;
812
- margin-bottom: 1rem;
813
  }
814
  h3 {
815
- color: #212529 !important;
816
  font-weight: 500 !important;
817
- font-size: 1.05rem !important;
 
818
  }
 
819
 
820
- /* --- Body Text --- */
821
- p, span, div {
822
- color: #212529;
823
- }
824
-
825
- /* --- Links --- */
826
- a {
827
- color: #003DA5 !important;
828
- text-decoration: none;
829
- }
830
- a:hover {
831
- text-decoration: underline;
832
- color: #00264D !important;
833
- }
834
 
835
- /* --- Labels --- */
836
  label {
837
  color: #212529 !important;
838
  font-weight: 500 !important;
839
- font-size: 0.95rem !important;
840
- margin-bottom: 0.4rem !important;
841
  }
842
 
843
- /* --- Form Inputs --- */
844
  input[type="text"], input[type="number"], textarea, select,
845
  .gr-box, .gr-input, .gr-dropdown {
846
  border: 1px solid #CED4DA !important;
847
  border-radius: 4px !important;
848
- padding: 0.5rem 0.75rem !important;
849
- font-size: 1rem !important;
850
  color: #212529 !important;
851
  background: #FFFFFF !important;
852
  }
853
  input:focus, textarea:focus, select:focus {
854
- border-color: #003DA5 !important;
855
- box-shadow: 0 0 0 2px rgba(0,61,165,0.15) !important;
856
  outline: none !important;
857
  }
858
 
859
- /* --- Primary Buttons --- */
860
  .gr-button-primary, button.primary {
861
- background: #003DA5 !important;
862
  color: #FFFFFF !important;
863
  border: none !important;
864
- border-radius: 5px !important;
865
  font-weight: 500 !important;
866
- font-size: 0.95rem !important;
867
- padding: 0.6rem 1.5rem !important;
868
  transition: background 0.15s ease !important;
 
869
  }
870
  .gr-button-primary:hover, button.primary:hover {
871
- background: #002D7A !important;
872
  }
873
 
874
- /* --- Secondary Buttons --- */
875
  .gr-button-secondary, button.secondary {
876
  background: #FFFFFF !important;
877
- color: #003DA5 !important;
878
- border: 1.5px solid #003DA5 !important;
879
- border-radius: 5px !important;
880
  font-weight: 500 !important;
881
- font-size: 0.95rem !important;
882
- padding: 0.6rem 1.5rem !important;
883
  transition: all 0.15s ease !important;
 
884
  }
885
  .gr-button-secondary:hover, button.secondary:hover {
886
  background: #F0F4FA !important;
887
- border-color: #002D7A !important;
888
  }
889
 
890
- /* --- Small / Back Buttons --- */
891
  button.sm {
892
- font-size: 0.85rem !important;
893
- padding: 0.35rem 0.9rem !important;
894
  color: #495057 !important;
895
  background: transparent !important;
896
  border: 1px solid #CED4DA !important;
897
  border-radius: 4px !important;
 
898
  }
899
- button.sm:hover {
900
- background: #F5F5F5 !important;
901
- color: #212529 !important;
902
- }
903
 
904
- /* --- Suggested Prompt Pill Buttons --- */
905
  .prompt-pill button {
906
  background: #FFFFFF !important;
907
- color: #003DA5 !important;
908
- border: 1.5px solid #003DA5 !important;
909
  border-radius: 20px !important;
910
- font-size: 0.85rem !important;
911
  font-weight: 400 !important;
912
- padding: 0.4rem 1rem !important;
913
- transition: all 0.15s ease !important;
 
914
  }
915
  .prompt-pill button:hover {
916
- background: #003DA5 !important;
917
- color: #FFFFFF !important;
918
  }
919
 
920
- /* --- Results / Disclaimer --- */
921
  blockquote {
922
  background: #FFF8E1 !important;
923
  border-left: 4px solid #FFC107 !important;
924
- padding: 0.75rem 1rem !important;
925
  border-radius: 4px !important;
926
- font-size: 0.9rem !important;
927
  color: #495057 !important;
928
- margin: 0 0 1rem 0 !important;
929
  }
930
 
931
- /* --- Status Badge --- */
932
- .markdown-text h3 {
933
- font-size: 1.05rem !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
934
  }
935
 
936
- /* --- Chatbot --- */
 
 
 
 
 
 
 
 
 
 
 
937
  .chatbot {
938
  border: 1px solid #E0E0E0 !important;
939
- border-radius: 6px !important;
940
  }
941
 
942
- /* --- Map iframe --- */
943
  .map-embed iframe {
944
- border-radius: 6px;
945
  border: 1px solid #E0E0E0;
946
  }
947
 
948
- /* --- Horizontal rules in markdown --- */
949
  hr {
950
  border: none !important;
951
  border-top: 1px solid #E0E0E0 !important;
952
- margin: 1rem 0 !important;
953
  }
954
 
955
- /* --- File download --- */
956
  .gr-file {
957
  border: 1px solid #E0E0E0 !important;
958
  border-radius: 4px !important;
959
  }
960
 
961
- /* --- Mobile Responsive --- */
962
  @media (max-width: 640px) {
963
- .gradio-container {
964
- padding-left: 0.75rem !important;
965
- padding-right: 0.75rem !important;
966
- }
967
- .ct-gov-bar {
968
- padding: 6px 12px;
969
- margin-left: -0.75rem;
970
- margin-right: -0.75rem;
971
- }
972
- .oha-header {
973
- padding: 1rem 12px;
974
- margin-left: -0.75rem;
975
- margin-right: -0.75rem;
976
- }
977
- .oha-header h1 {
978
- font-size: 1.35rem !important;
979
- }
980
- .gr-group {
981
- padding: 1rem !important;
982
- }
983
- .prompt-pill button {
984
- font-size: 0.78rem !important;
985
- padding: 0.35rem 0.75rem !important;
986
- }
987
  }
988
  """
989
 
@@ -995,8 +998,8 @@ def create_interface():
995
  theme=gr.themes.Default(
996
  primary_hue=gr.themes.Color(
997
  c50="#F0F4FA", c100="#D6E2F5", c200="#AECAEF",
998
- c300="#7BAEE6", c400="#4A8FDB", c500="#003DA5",
999
- c600="#003490", c700="#002D7A", c800="#00264D",
1000
  c900="#001B3A", c950="#001028",
1001
  ),
1002
  neutral_hue=gr.themes.Color(
@@ -1035,6 +1038,9 @@ def create_interface():
1035
  '</div>'
1036
  )
1037
 
 
 
 
1038
  with gr.Row(elem_classes="lang-row"):
1039
  lang_toggle = gr.Radio(
1040
  choices=["English", "Espa\u00f1ol"],
@@ -1387,6 +1393,16 @@ def create_interface():
1387
  # Keep chat_history_state in sync with chatbot display
1388
  chatbot.change(fn=lambda h: h, inputs=[chatbot], outputs=[chat_history_state])
1389
 
 
 
 
 
 
 
 
 
 
 
1390
  return demo
1391
 
1392
  # === LAUNCH ===
 
467
 
468
  """
469
 
470
+ # Status badge
471
+ is_eligible = data['eligibility_status'] == t['eligible']
472
+ badge_class = "badge-eligible" if is_eligible else "badge-not-eligible"
473
+ badge_html = f'<span class="{badge_class}">{data["eligibility_status"]}</span>'
474
+
475
  # Header
476
  header = f"""## {data['hospital']}
477
 
478
+ ### {t['status']}: {badge_html}
479
 
480
+ Income: ${data['income']:,.0f} ({data['fpl_percentage']}% FPL)
481
 
482
  ---
483
 
 
488
 
489
  ---
490
 
491
+ **Contact:** {data['contact']}
492
 
493
  ---
494
 
495
+ ### {t['sources']}
 
 
 
 
496
 
497
+ - [**{data['hospital']} Financial Assistance Policy**]({data['fap_url']})
498
+ - [**Connecticut Public Act 24-81**](https://www.cga.ct.gov/2024/ba/pdf/2024HB-05320-R000149-BA.pdf)
499
+ - [**2025 Federal Poverty Level Guidelines**](https://www.healthcare.gov/glossary/federal-poverty-level-fpl/)
500
+ - [**CT Office of the Healthcare Advocate**](https://portal.ct.gov/oha)
501
 
502
  ---
503
 
 
633
  # === CUSTOM CSS ===
634
 
635
  custom_css = """
636
+ /* ===== CT.GOV / OHA Design System ===== */
637
 
638
+ /* ---------- GLOBAL ---------- */
639
  .gradio-container {
640
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
641
+ "Helvetica Neue", Arial, sans-serif !important;
642
+ max-width: 900px !important;
643
  width: 100% !important;
644
  margin: 0 auto !important;
645
+ padding: 0 32px !important;
 
646
  background: #FFFFFF !important;
647
  color: #212529 !important;
648
  font-size: 16px !important;
 
651
  box-sizing: border-box !important;
652
  }
653
 
654
+ /* Kill ALL flex gap on the top-level Gradio column so hidden children
655
+ leave no trace. Spacing comes from component margins instead. */
656
+ .gradio-container > div,
657
+ .gradio-container > div > div {
658
+ gap: 0 !important;
 
 
 
659
  }
660
+
661
+ /* ---------- CT.GOV TOP BAR ---------- */
662
+ .ct-gov-bar {
663
+ background: #003478;
664
+ height: 40px;
665
+ display: flex;
666
+ align-items: center;
667
+ padding: 0 32px;
668
+ margin: -16px -32px 0 -32px; /* bleed to edges */
669
  }
670
+ .ct-gov-bar a,
671
+ .ct-gov-bar a span,
672
+ .ct-gov-bar a strong {
673
  color: #FFFFFF !important;
674
+ text-decoration: none !important;
675
+ font-size: 14px;
676
  }
677
+ .ct-gov-bar a:hover span { text-decoration: underline !important; }
678
 
679
+ /* ---------- OHA HEADER BAND ---------- */
680
  .oha-header {
681
+ background: #0046AD;
682
+ padding: 24px 32px;
683
+ margin: 0 -32px 0 -32px; /* bleed to edges */
 
684
  }
685
  .oha-header a {
686
  color: #FFFFFF !important;
687
+ text-decoration: none !important;
688
+ display: block;
 
 
689
  }
690
+ .oha-header a:hover { opacity: 0.92; }
691
  .oha-header h1 {
692
  color: #FFFFFF !important;
693
+ font-size: 36px !important;
694
  font-weight: 300 !important;
695
  margin: 0 !important;
696
  padding: 0 !important;
697
  border: none !important;
698
+ line-height: 1.2;
699
  }
700
  .oha-header .oha-subtitle {
701
  color: rgba(255,255,255,0.85);
702
+ font-size: 16px;
703
+ margin-top: 4px;
704
  font-weight: 400;
705
  }
706
  .oha-header .oha-beta {
707
  display: inline-block;
708
+ background: #FFC107;
709
+ color: #664D03;
710
  padding: 2px 10px;
711
+ border-radius: 10px;
712
+ font-size: 11px;
713
  font-weight: 600;
714
+ letter-spacing: 0.05em;
715
+ margin-left: 12px;
716
  vertical-align: middle;
717
  }
718
 
719
+ /* Thin separator below header */
720
+ .oha-separator {
721
+ height: 1px;
722
+ background: #E0E0E0;
723
+ margin: 0 -32px 16px -32px;
724
+ }
725
+
726
+ /* ---------- FOOTER ---------- */
727
+ .oha-footer {
728
+ background: #003478;
729
+ color: #FFFFFF;
730
+ font-size: 13px;
731
+ padding: 16px 32px;
732
+ margin: 2rem -32px -16px -32px;
733
+ text-align: center;
734
+ line-height: 1.5;
735
+ }
736
+ .oha-footer a {
737
+ color: #FFFFFF !important;
738
+ text-decoration: underline !important;
739
+ }
740
+
741
+ /* ---------- LANGUAGE TOGGLE ---------- */
742
  .lang-row {
743
  justify-content: flex-end !important;
744
+ margin: 8px 0 12px 0 !important;
745
  min-height: 0 !important;
746
  gap: 0 !important;
747
+ padding: 0 !important;
748
+ border: none !important;
749
+ background: transparent !important;
750
  }
751
 
752
+ /* ---------- GROUPS (default = invisible wrapper) ---------- */
753
  .gr-group {
754
+ background: transparent !important;
755
+ border: none !important;
756
+ box-shadow: none !important;
757
+ padding: 0 !important;
758
+ margin: 0 0 8px 0 !important;
 
 
 
759
  }
760
 
761
+ /* Active step gets a subtle card treatment */
762
+ .step-group {
763
+ background: #FFFFFF !important;
764
+ padding: 24px !important;
765
+ border-radius: 4px !important;
766
+ box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
767
+ margin-bottom: 12px !important;
768
+ border: none !important;
 
769
  }
770
 
771
+ /* ---------- HIDDEN STEP COLLAPSE ---------- */
772
+ /* Gradio wraps every component in a div. When a Group is hidden the
773
+ wrapper div often keeps its layout contribution (flex gap, min-height).
774
+ Nuke everything. */
 
 
 
 
775
  .step-group[style*="display: none"],
776
  .step-group[style*="display:none"],
777
+ .step-group.hidden, .step-group.hide {
778
+ display: none !important;
779
+ padding: 0 !important; margin: 0 !important;
780
+ border: none !important; box-shadow: none !important;
781
+ min-height: 0 !important; max-height: 0 !important;
 
 
 
782
  overflow: hidden !important;
783
  }
784
+ /* Wrapper div around a hidden step-group */
 
785
  div:has(> .step-group[style*="display: none"]),
786
  div:has(> .step-group[style*="display:none"]),
787
  div:has(> .step-group.hidden),
788
  div:has(> .step-group.hide) {
 
 
 
 
 
 
 
 
789
  display: none !important;
790
+ padding: 0 !important; margin: 0 !important;
791
+ min-height: 0 !important; max-height: 0 !important;
792
+ gap: 0 !important; overflow: hidden !important;
793
  }
794
+ /* Belt-and-suspenders: any hidden div inside the app */
 
795
  .gradio-container div[style*="display: none"],
796
  .gradio-container div[style*="display:none"] {
797
+ padding: 0 !important; margin: 0 !important;
798
+ border: none !important; box-shadow: none !important;
799
+ max-height: 0 !important; overflow: hidden !important;
 
 
 
800
  }
801
 
802
+ /* ---------- TYPOGRAPHY ---------- */
 
 
 
 
 
 
 
 
803
  h1 {
804
+ color: #003478 !important;
805
  font-weight: 300 !important;
806
  border: none !important;
807
  padding: 0 !important;
808
  }
809
  h2 {
810
+ color: #003478 !important;
811
+ font-weight: 400 !important;
812
  font-size: 1.35rem !important;
813
+ border: none !important;
814
+ padding: 0 !important;
815
+ margin: 0 0 0.75rem 0 !important;
816
  }
817
  h3 {
818
+ color: #333333 !important;
819
  font-weight: 500 !important;
820
+ font-size: 18px !important;
821
+ margin: 0 0 0.5rem 0 !important;
822
  }
823
+ p, span, li { color: #212529; }
824
 
825
+ /* ---------- LINKS ---------- */
826
+ a { color: #0046AD !important; text-decoration: none; }
827
+ a:hover { text-decoration: underline; color: #003478 !important; }
 
 
 
 
 
 
 
 
 
 
 
828
 
829
+ /* ---------- LABELS ---------- */
830
  label {
831
  color: #212529 !important;
832
  font-weight: 500 !important;
833
+ font-size: 14px !important;
834
+ margin-bottom: 6px !important;
835
  }
836
 
837
+ /* ---------- FORM INPUTS ---------- */
838
  input[type="text"], input[type="number"], textarea, select,
839
  .gr-box, .gr-input, .gr-dropdown {
840
  border: 1px solid #CED4DA !important;
841
  border-radius: 4px !important;
842
+ padding: 10px 12px !important;
843
+ font-size: 16px !important;
844
  color: #212529 !important;
845
  background: #FFFFFF !important;
846
  }
847
  input:focus, textarea:focus, select:focus {
848
+ border-color: #0046AD !important;
849
+ box-shadow: 0 0 0 2px rgba(0,70,173,0.15) !important;
850
  outline: none !important;
851
  }
852
 
853
+ /* ---------- PRIMARY BUTTONS ---------- */
854
  .gr-button-primary, button.primary {
855
+ background: #0046AD !important;
856
  color: #FFFFFF !important;
857
  border: none !important;
858
+ border-radius: 4px !important;
859
  font-weight: 500 !important;
860
+ font-size: 15px !important;
861
+ padding: 12px 24px !important;
862
  transition: background 0.15s ease !important;
863
+ min-height: 0 !important;
864
  }
865
  .gr-button-primary:hover, button.primary:hover {
866
+ background: #003478 !important;
867
  }
868
 
869
+ /* ---------- SECONDARY BUTTONS ---------- */
870
  .gr-button-secondary, button.secondary {
871
  background: #FFFFFF !important;
872
+ color: #0046AD !important;
873
+ border: 1px solid #0046AD !important;
874
+ border-radius: 4px !important;
875
  font-weight: 500 !important;
876
+ font-size: 15px !important;
877
+ padding: 12px 24px !important;
878
  transition: all 0.15s ease !important;
879
+ min-height: 0 !important;
880
  }
881
  .gr-button-secondary:hover, button.secondary:hover {
882
  background: #F0F4FA !important;
 
883
  }
884
 
885
+ /* ---------- SMALL / BACK BUTTONS ---------- */
886
  button.sm {
887
+ font-size: 13px !important;
888
+ padding: 6px 14px !important;
889
  color: #495057 !important;
890
  background: transparent !important;
891
  border: 1px solid #CED4DA !important;
892
  border-radius: 4px !important;
893
+ min-height: 0 !important;
894
  }
895
+ button.sm:hover { background: #F5F5F5 !important; color: #212529 !important; }
 
 
 
896
 
897
+ /* ---------- SUGGESTED-PROMPT PILLS ---------- */
898
  .prompt-pill button {
899
  background: #FFFFFF !important;
900
+ color: #333333 !important;
901
+ border: 1px solid #CED4DA !important;
902
  border-radius: 20px !important;
903
+ font-size: 13px !important;
904
  font-weight: 400 !important;
905
+ padding: 8px 16px !important;
906
+ transition: background 0.15s ease !important;
907
+ min-height: 0 !important;
908
  }
909
  .prompt-pill button:hover {
910
+ background: #F0F4FA !important;
 
911
  }
912
 
913
+ /* ---------- RESULTS / DISCLAIMER ---------- */
914
  blockquote {
915
  background: #FFF8E1 !important;
916
  border-left: 4px solid #FFC107 !important;
917
+ padding: 12px 16px !important;
918
  border-radius: 4px !important;
919
+ font-size: 14px !important;
920
  color: #495057 !important;
921
+ margin: 0 0 16px 0 !important;
922
  }
923
 
924
+ /* Status badges (rendered as <span> in markdown) */
925
+ .badge-eligible {
926
+ display: inline-block;
927
+ background: #D4EDDA;
928
+ color: #155724;
929
+ padding: 4px 14px;
930
+ border-radius: 12px;
931
+ font-weight: 600;
932
+ font-size: 14px;
933
+ }
934
+ .badge-not-eligible {
935
+ display: inline-block;
936
+ background: #FFF3CD;
937
+ color: #856404;
938
+ padding: 4px 14px;
939
+ border-radius: 12px;
940
+ font-weight: 600;
941
+ font-size: 14px;
942
  }
943
 
944
+ /* Streaming reflow prevention */
945
+ .results-area {
946
+ width: 100% !important;
947
+ min-height: 300px;
948
+ box-sizing: border-box !important;
949
+ }
950
+ .results-area .prose {
951
+ overflow-wrap: break-word;
952
+ word-break: break-word;
953
+ }
954
+
955
+ /* ---------- CHATBOT ---------- */
956
  .chatbot {
957
  border: 1px solid #E0E0E0 !important;
958
+ border-radius: 4px !important;
959
  }
960
 
961
+ /* ---------- MAP ---------- */
962
  .map-embed iframe {
963
+ border-radius: 4px;
964
  border: 1px solid #E0E0E0;
965
  }
966
 
967
+ /* ---------- HORIZONTAL RULES ---------- */
968
  hr {
969
  border: none !important;
970
  border-top: 1px solid #E0E0E0 !important;
971
+ margin: 16px 0 !important;
972
  }
973
 
974
+ /* ---------- FILE DOWNLOAD ---------- */
975
  .gr-file {
976
  border: 1px solid #E0E0E0 !important;
977
  border-radius: 4px !important;
978
  }
979
 
980
+ /* ---------- MOBILE ---------- */
981
  @media (max-width: 640px) {
982
+ .gradio-container { padding: 0 12px !important; }
983
+ .ct-gov-bar { padding: 0 12px; margin-left: -12px; margin-right: -12px; }
984
+ .oha-header { padding: 16px 12px; margin-left: -12px; margin-right: -12px; }
985
+ .oha-header h1 { font-size: 24px !important; }
986
+ .oha-separator { margin-left: -12px; margin-right: -12px; }
987
+ .oha-footer { padding: 12px; margin-left: -12px; margin-right: -12px; }
988
+ .step-group { padding: 16px !important; }
989
+ .prompt-pill button { font-size: 12px !important; padding: 6px 12px !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
990
  }
991
  """
992
 
 
998
  theme=gr.themes.Default(
999
  primary_hue=gr.themes.Color(
1000
  c50="#F0F4FA", c100="#D6E2F5", c200="#AECAEF",
1001
+ c300="#7BAEE6", c400="#4A8FDB", c500="#0046AD",
1002
+ c600="#003D96", c700="#003478", c800="#002B63",
1003
  c900="#001B3A", c950="#001028",
1004
  ),
1005
  neutral_hue=gr.themes.Color(
 
1038
  '</div>'
1039
  )
1040
 
1041
+ # Thin separator line below header
1042
+ gr.HTML('<div class="oha-separator"></div>')
1043
+
1044
  with gr.Row(elem_classes="lang-row"):
1045
  lang_toggle = gr.Radio(
1046
  choices=["English", "Espa\u00f1ol"],
 
1393
  # Keep chat_history_state in sync with chatbot display
1394
  chatbot.change(fn=lambda h: h, inputs=[chatbot], outputs=[chat_history_state])
1395
 
1396
+ # Footer
1397
+ gr.HTML(
1398
+ '<div class="oha-footer">'
1399
+ 'Office of the Healthcare Advocate &nbsp;|&nbsp; '
1400
+ '153 Market Street, 6th Floor, Hartford, CT 06103 &nbsp;|&nbsp; '
1401
+ '1-866-466-4446 &nbsp;|&nbsp; '
1402
+ '<a href="https://portal.ct.gov/oha" target="_blank" rel="noopener">portal.ct.gov/oha</a>'
1403
+ '</div>'
1404
+ )
1405
+
1406
  return demo
1407
 
1408
  # === LAUNCH ===