/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Define CSS layer for custom styling to ensure proper cascade order */
@layer ashby-custom;

@layer ashby-custom {
    /* Custom styling for Ashby Job Board */
    :root {
    /* Override the default font family with Inter for body text */
    --fontFamily: "Inter", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Helvetica", "Arial", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    
    /* Override the background color */
    --colorAppBackground: #F5F1EA;
    
    /* Set all border radius values to 6px */
    --borderRadiusContainer: 6px;
    --borderRadiusControl: 6px;
    --borderRadiusButton: 6px;
    }

    /* Apply Inter font to all Ashby elements by default - with higher specificity */
    [class*="ashby-"] {
        font-family: var(--fontFamily) !important;
    }
    
    /* Force Inter font on common HTML elements within Ashby containers */
    div[class*="ashby-"],
    p[class*="ashby-"],
    span[class*="ashby-"],
    section[class*="ashby-"],
    article[class*="ashby-"] {
        font-family: var(--fontFamily) !important;
    }

    /* Set heading fonts to Crimson Text Regular */
    .ashby-job-board-heading,
    .ashby-job-posting-heading,
    .ashby-job-posting-header,
    .ashby-job-posting-brief-title,
    .ashby-department-heading,
    .ashby-department-heading-level,
    .ashby-job-posting-brief-department-heading,
    .ashby-job-posting-brief-department-heading-level,
    .ashby-application-form-section-header-title,
    .ashby-application-form-question-title,
    .ashby-application-form-autofill-input-title {
        font-family: "Crimson Text", serif !important;
        font-weight: 400 !important; /* Regular weight */
    }

    /* Ensure body text uses Inter (already set in --fontFamily variable) */
    .ashby-application-form-container,
    .ashby-job-posting-brief-details,
    .ashby-application-form-question-description,
    .ashby-application-form-section-header-description,
    .ashby-job-board-filters-label,
    .ashby-job-board-reset-filters-label,
    .ashby-job-board-heading-count,
    .ashby-application-form-autofill-input-description,
    .ashby-application-form-texting-consent-description,
    .ashby-job-posting-brief-list,
    .ashby-job-posting-left-pane,
    .ashby-job-posting-right-pane,
    .ashby-job-posting-right-pane-application-tab,
    .ashby-job-posting-right-pane-overview-tab,
    .ashby-job-posting-right-pane-tab-slider,
    .ashby-job-board-back-to-all-jobs-button,
    .ashby-job-board-filter,
    .ashby-application-form-field-entry,
    .ashby-application-form-section-container,
    .ashby-application-form-section-header,
    .ashby-application-form-submit-button,
    .ashby-application-form-success-container,
    .ashby-application-form-failure-container,
    .ashby-application-form-blocked-application-container,
    .ashby-survey-form-container,
    .ashby-application-form-autofill-input-root,
    .ashby-application-form-autofill-input-base-layer,
    .ashby-application-form-autofill-input-drag-layer,
    .ashby-application-form-autofill-input-form-alert,
    .ashby-application-form-autofill-input-icon,
    .ashby-application-form-autofill-pane,
    .ashby-application-form-autofill-uploader {
        font-family: var(--fontFamily) !important;
    }

    /* Target all text content including About Us and job descriptions */
    .ashby-job-posting-brief *,
    .ashby-job-posting-left-pane *,
    .ashby-job-posting-right-pane *,
    .ashby-application-form-container *,
    /* Target any div, p, span, or text elements within Ashby components */
    [class*="ashby-"] div,
    [class*="ashby-"] p,
    [class*="ashby-"] span,
    [class*="ashby-"] li,
    [class*="ashby-"] td,
    [class*="ashby-"] th,
    [class*="ashby-"] label,
    [class*="ashby-"] a,
    [class*="ashby-"] button,
    [class*="ashby-"] input,
    [class*="ashby-"] textarea,
    [class*="ashby-"] select {
        font-family: var(--fontFamily) !important;
    }
    
    /* Ensure all nested content inherits the font */
    [class*="ashby-"] * {
        font-family: inherit !important;
    }
}
