/* ========================================
   CAMPAIGN WEBSITE STYLES - YES ON 50
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Management */
*:focus {
    outline: 3px solid var(--secondary-color, #dd0424);
    outline-offset: 2px;
}


body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fbf8f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.lead {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Header */
.header {
    background-color: var(--primary-color, #0c3ba0);
    color: var(--text-on-primary, white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-on-primary, white);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    border-bottom-color: var(--secondary-color, #dd0424);
}

.language-toggle select {
    background-color: white;
    color: #0c3ba0;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-size: 0.9rem;
    min-width: 140px;
    cursor: pointer;
}

.language-toggle select:focus {
    outline: none;
    border-color: #dd0424;
    box-shadow: 0 0 5px rgba(221, 4, 36, 0.3);
}

.language-toggle select option {
    background-color: white;
    color: #0c3ba0;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color, #0c3ba0) 0%, var(--primary-dark, #2a2a40) 100%);
    color: var(--text-on-primary, white);
    padding: 6rem 0;
    text-align: center;
}

/* Hero text colors - use !important to override inline styles from database */
.hero .hero-title,
.hero h1 {
    color: white !important;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero .hero-subtitle,
.hero .hero-content > p {
    font-size: 1.4rem;
    color: white !important;
    background-color: var(--secondary-color, #dd0424) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    margin: 2rem auto;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem !important;
    display: inline-block !important;
    border-radius: 3px;
    max-width: 90%;
}

.hero-form {
    margin-top: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.signup-form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.submit-field {
    justify-self: center;
}

.form-input {
    background-color: #ffffff;
    color: #2c3e50;
    border: 2px solid #ddd;
    border-radius: 0.125rem;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    min-height: 2.875rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color, #3183ff);
    box-shadow: 0 0 0 3px rgba(49, 131, 255, 0.2);
    background-color: #ffffff;
}

.error-message {
    color: #ff9799;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.form-disclaimer {
    margin-top: 1.5rem;
    text-align: center;
}

.form-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.form-disclaimer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 0;
}

.form-disclaimer a {
    color: #dd0424;
    text-decoration: underline;
}

.form-disclaimer a:hover,
.form-disclaimer a:focus {
    color: #ffffff;
    background-color: #dd0424;
    padding: 2px 4px;
    border-radius: 2px;
}

.submit-btn {
    background-color: #3183ff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 3px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px;
}

.submit-btn:hover {
    background-color: #5096ff;
}

/* Content Sections */
.emergency,
.proposition,
.voices,
.action {
    padding: 4rem 0;
}

.emergency {
    background-color: white;
    border-left: 5px solid var(--secondary-color, #dd0424);
}

.proposition {
    background-color: #f8f9fa;
}

.voices {
    background-color: white;
}

.action {
    background-color: #fbf8f5;
    color: #2c3e50;
    padding: 4rem 0;
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

/* Section titles on colored backgrounds - use !important to override inline styles */
.action .section-title,
.action h2,
.action h3 {
    color: white !important;
}

.hero .section-title,
.hero h2 {
    color: white !important;
}

/* Make sure all text in hero sections is visible */
.hero p,
.hero li,
.hero span {
    color: white !important;
}

/* Override understanding-section styles when in hero layout */
.hero .understanding-section h3 {
    color: white !important;
    border-left-color: rgba(255,255,255,0.5) !important;
}

.hero .understanding-section p,
.hero .understanding-section li {
    color: white !important;
}

/* Make sure all text in action sections is visible */
.action p,
.action .action-description {
    color: white !important;
}

.emergency-intro {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.emergency-sections {
    margin-bottom: 2rem;
}

.emergency-section {
    margin-bottom: 2rem;
}

.emergency-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
    color: #2c3e50;
}


/* Benefits Grid */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.benefit-item {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.benefit-item h3 {
    color: var(--primary-color, #0c3ba0);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.proposition-note {
    background-color: #e9ecef;
    padding: 2rem;
    border-radius: 5px;
    margin-top: 3rem;
    text-align: left;
}

.proposition-note h3 {
    color: var(--primary-color, #0c3ba0);
    margin-bottom: 1rem;
}

/* Understanding Prop 50 Section */
.understanding-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.understanding-section {
    margin-bottom: 2.5rem;
}

.understanding-section h3 {
    color: #0c3ba0;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-left: 4px solid #0c3ba0;
    padding-left: 1rem;
}

.understanding-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.understanding-section ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin: 1rem 0;
}

.understanding-section li {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.understanding-section li:last-child {
    margin-bottom: 0;
}

/* Voting Dates Table */
.voting-dates-content {
    max-width: 1000px;
    margin: 0 auto;
}

.dates-table-wrapper {
    overflow-x: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dates-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Open Sans', sans-serif;
}

.dates-table th {
    background-color: #0c3ba0;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.dates-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.dates-table tr:nth-child(even) {
    background-color: #fbf8f5;
}

.dates-table tr:hover {
    background-color: #f0f0f0;
}

.dates-table td:first-child {
    font-weight: 600;
    color: #0c3ba0;
    white-space: nowrap;
    min-width: 120px;
}

/* Ensure election day row text is visible */
.election-day-row td:first-child {
    color: #0c3ba0 !important;
}

/* Force stars to be gold - override any table cell color */
.election-day-row .blinking-stars,
span.blinking-stars {
    color: #ffd700 !important;
}

.dates-table td:nth-child(2) {
    font-size: 1rem;
    line-height: 1.5;
    color: #2c3e50;
}

.countdown {
    font-family: 'Oswald', monospace;
    font-weight: 600;
    color: #dd0424;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 120px;
}

.past-date {
    color: #7f8c8d;
    font-style: italic;
}

/* Election Day Special Styling */
.election-day-row {
    background-color: #fff5f5 !important;
}

.election-day-row:hover {
    background-color: #ffe5e5 !important;
}

.blinking-stars {
    color: #ffd700 !important;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    animation: blink 1.5s infinite;
    display: inline-block;
}

.countdown-date {
    font-family: 'Oswald', monospace;
    font-weight: 600;
    color: #dd0424;
    font-size: 1rem;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.action-item {
    text-align: center;
}

.action-item h3 {
    color: #2c3e50 !important;
    margin-bottom: 1rem;
}

.action-item p {
    color: #2c3e50 !important;
    margin-bottom: 1.5rem;
}


/* All action buttons - consistent styling */
.donate-btn,
.volunteer-btn,
.register-btn {
    background-color: #3183ff;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 3px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.donate-btn:hover,
.volunteer-btn:hover,
.register-btn:hover {
    background-color: #5096ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* References Section */
.references {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

.references-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.references-list {
    list-style: decimal;
    padding-left: 2rem;
    counter-reset: reference-counter;
}

.references-list li {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.references-list li:last-child {
    margin-bottom: 0;
}

.references-list a {
    color: #0c3ba0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.references-list a:hover {
    color: #dd0424;
    text-decoration: underline;
}

.references-list a:visited {
    color: #6a5acd;
}

/* Footer */
.footer {
    background-color: #2a2a40;
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 100;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ccc;
}

.footer-legal p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.fppc {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Privacy Page */
.privacy-hero,
.contact-hero {
    background-color: #0c3ba0;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.privacy-hero h1,
.contact-hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.last-updated {
    font-style: italic;
    opacity: 0.8;
}

.privacy-content,
.contact-content {
    padding: 4rem 0;
    background-color: white;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-intro {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.privacy-section {
    margin-bottom: 2.5rem;
}

.privacy-section h3 {
    color: #0c3ba0;
    border-left: 4px solid #0c3ba0;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.privacy-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.privacy-section li {
    margin-bottom: 0.5rem;
}

.privacy-cta {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
    text-align: center;
    margin-top: 3rem;
}

.privacy-cta h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color, #0c3ba0);
    color: var(--text-on-primary, white);
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark, #094386);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color, #0c3ba0);
    border: 2px solid var(--primary-color, #0c3ba0);
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--primary-color, #0c3ba0);
    color: var(--text-on-primary, white);
}

/* Contact Page */
.contact-form-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0c3ba0;
}

.contact-form .submit-btn {
    width: 100%;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
    height: fit-content;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.info-item {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .form-grid {
        gap: 0.75rem;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .donate-btn,
    .volunteer-btn {
        width: 200px;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-form-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .dates-table th,
    .dates-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .dates-table td:first-child {
        min-width: 100px;
    }

    .countdown {
        font-size: 0.85rem;
        min-width: 100px;
    }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Language dropdown scrollable styling */
/* Target dropdown via data-testid attribute for reliable matching */
[data-testid="language-dropdown-menu"].dropdown-menu {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
}

/* Custom scrollbar styling for better UX */
[data-testid="language-dropdown-menu"].dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

[data-testid="language-dropdown-menu"].dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

[data-testid="language-dropdown-menu"].dropdown-menu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

[data-testid="language-dropdown-menu"].dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* ========================================
   HUGGING FACE CHATBOT STYLING
   ======================================== */

/* Hugging Face Chatbot Container */
.hf-chatbot-container {
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto 3rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.hf-chatbot-container gradio-app {
    display: block;
    width: 100%;
    min-height: 800px;
    max-height: 900px;
    border: none;
    overflow: auto;
}

/* Override Gradio iframe if needed */
.hf-chatbot-container iframe {
    width: 100% !important;
    min-height: 800px !important;
    max-height: 900px !important;
    border: none !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hf-chatbot-container {
        margin: 2rem 0;
        padding: 0;
    }
    
    .hf-chatbot-container gradio-app,
    .hf-chatbot-container iframe {
        min-height: 600px !important;
    }
}
