:root {
    /* Colours */
    --color-primary: rgb(38, 47, 84);
    --color-secondary: rgb(49, 75, 130);
    --color-tertiary: rgb(52, 160, 218);
    --color-text: rgb(79, 93, 123);
    --color-accent: rgb(111, 217, 41);
    /* Typography */
    --font-heading: Heebo, sans-serif;
    --font-body: Karla, sans-serif;
    --font-weight-normal: 400;
    --font-weight-heavy: 700;
    /* Heading sizes */
    --h1-size: 60px;
    --h2-size: 48px;
    --h3-size: 38px;
    --h4-size: 28px;
    --h5-size: 24px;
    --h6-size: 18px;
    /* Base */
    --body-size: 18px;
    --body-line-height: 1.6;
    --heading-line-height: 1.2;
}

/* Base text */
body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-normal);
    font-size: var(--body-size);
    line-height: var(--body-line-height);
    color: var(--color-text);
}

.navigation-loading-overlay {
    align-items: center;
    background-color: rgba(245, 248, 255, 0.92);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
    visibility: hidden;
    z-index: 2000;
}

.navigation-loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 180ms ease;
    visibility: visible;
}

.navigation-loading-indicator {
    position: relative;
}

.navigation-loading-indicator::before,
.navigation-loading-indicator::after {
    animation: navigation-loading-ripple 2s ease-out infinite;
    border: 0.2rem solid var(--color-primary);
    border-radius: 50%;
    content: "";
    inset: -0.4rem;
    opacity: 0;
    position: absolute;
}

.navigation-loading-indicator::after {
    animation-delay: 1s;
}

@keyframes navigation-loading-ripple {
    0% {
        opacity: 0.8;
        transform: scale(0);
    }

    100% {
        opacity: 0;
        transform: scale(6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .navigation-loading-overlay,
    .navigation-loading-overlay.is-visible {
        transition: none;
    }

    .navigation-loading-indicator {
        animation: none;
    }

    .navigation-loading-indicator::before,
    .navigation-loading-indicator::after {
        animation: none;
        opacity: 0;
    }
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading) !important;
    color: var(--color-primary);
    margin: 0 0 0.5em;
}

h1 {
    font-size: var(--h1-size);
    line-height: var(--heading-line-height);
}

h2 {
    font-size: var(--h2-size);
    line-height: var(--heading-line-height);
    font-weight: var(--font-weight-heavy) !important;
}

h3 {
    font-size: var(--h3-size);
    line-height: 1.25;
    font-weight: 700;
}

h4 {
    font-size: var(--h4-size);
    line-height: 1.3;
}

h5 {
    font-size: var(--h5-size);
    line-height: 1.3;
}

h6 {
    font-size: var(--h6-size);
    line-height: 1.4;
}

p {
    font-family: var(--font-body) !important;
    font-size: var(--body-size);
    line-height: 1.4;
}

/* Links and accents */
a {
    color: var(--color-accent);
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-tertiary {
    color: var(--color-tertiary);
}

.text-accent {
    color: var(--color-accent);
}

.text-body {
    color: var(--color-text);
}

.text-white {
    color: var(--color-text);
}

text-heavy {
    font-weight: var(--font-weight-heavy);
}


/* Nav Styling */
.mud-button-text.mud-button-text-primary.nav-item:hover {
    background-color: rgb(245, 248, 255);
    border: 0;
}

.nav-item > span {
    text-transform: none;
    font-size: 18px;
    font-weight: 400;
    font-style: normal;
    line-height: 20px;
    font-family: Heebo, sans-serif;
    color: var(--color-text);
    padding-top:20px;
}

    .nav-item > span:hover {
        color: var(--color-tertiary);
    }

.site-nav {
    width: 100%;
}

.site-nav .mud-navmenu {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start; /* desktop */
    flex-wrap: wrap;
}

.site-nav .nav-item,
.site-nav .site-auth-button {
    flex: 0 0 auto;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top:30px;
}

.site-auth-button:hover {
    background-color: var(--color-primary) !important;
}

/* Mobile/tablet: spread items out more evenly */
@media (max-width: 695px) {
    .mud-navmenu.mud-navmenu-default.mud-navmenu-margin-none {
        justify-content: space-evenly;
        width: 100%;
    }

    .nav-menu, .site-nav {
        width:100%;
    }
}

/* Homepage */
.diagonal-page-header {
    background-image: url(/diagonal.svg);
    background-position: bottom center;
    background-size: cover;
    padding-top: 95px;
    padding-bottom: 350px;
}

.search-input div div:before {
    display: none;
}

.search-table thead button > span > svg, .search-table thead .mud-sort-index {
    color: white;
}

.search-table table thead {
    background-color: var(--color-secondary);
}


    /* Table shrink */
    @media (max-width: 860px) {
        .search-table th:nth-child(3),
        .search-table td:nth-child(3) {
            display: none !important;
        }
    }
@media (max-width: 700px) {
    .search-table th:nth-child(2),
    .search-table td:nth-child(2) {
        display: none !important;
    }
    .diagonal-page-header {
        padding-top: 20px;
    }
}


/* footer */
.site-footer {
    background-image: url(/footer.svg);
    background-position: top left;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: 145px;
    padding-bottom: 20px;

}

/* Responsive Footer sizes */
@media (max-width: 960px) {
    .site-footer {
        background-position: right;
    }
}



/* Dashboard */
.dashboard-page {
    min-height: 800px;
    gap: 1.5rem;
}

.dashboard-header {
    gap: 1rem;
}

.dashboard-header-content {
    gap: 1rem;
}

.dashboard-header-action {
    flex: 0 0 auto;
}

.dashboard-summary-grid {
    margin: 0;
}

.dashboard-summary-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(49, 75, 130, 0.14);
    border-radius: 12px;
    display: flex;
    gap: 0.45rem;
    min-height: 130px;
    padding: 1.25rem;
    text-align: center;
}

.dashboard-summary-card-warning {
    border-color: rgba(255, 152, 0, 0.35);
}

.dashboard-summary-value {
    color: var(--color-primary);
    font-weight: var(--font-weight-heavy);
    margin: 0;
}

.dashboard-renewal-alert {
    margin: 0;
}

.dashboard-card-title, .dashboard-card-helper {
    color: white;
}

.dashboard-grid {
    align-items: stretch;
}

.dashboard-grid-item {
    display: flex;
}

.dashboard-card {
    width: 100%;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.dashboard-card-content {
    flex: 1 1 auto;
}

.dashboard-card-heading {
    gap: 1rem;
}

.dashboard-card-value {
    margin: 0;
}

.dashboard-widget {
    width: 100%;
}

.dashboard-empty-state {
    align-items: center;
    background: #fff;
    border: 1px dashed rgba(49, 75, 130, 0.35);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    text-align: center;
}

.dashboard-empty-state h5,
.dashboard-empty-state p {
    margin: 0;
}

.annual-return-item .annual-return-card {
    border: 2px solid transparent;
    border-radius: 12px;
}

.dashboard-table {
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
}

.dashboard-table tbody tr {
    transition: background-color 150ms ease;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(52, 160, 218, 0.06);
}

 .dashboard-table table thead {
    background-color: var(--color-tertiary);
}

    .dashboard-table thead button > span > svg, .dashboard-table thead .mud-sort-index {
        color: white;
    }

.ar-icon .mud-alert-icon {
    padding-top:10px;
}

.new-reg-button:hover {
    background-color: var(--color-secondary) !important;
}

@media (max-width: 700px) {
    .dashboard-header-content,
    .dashboard-renewal-alert .mud-stack {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .dashboard-header-action {
        width: 100%;
    }

    .dashboard-card-heading {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .dashboard-card {
        min-height: 0;
        padding: 1.25rem;
    }

    .dashboard-summary-card {
        min-height: 0;
    }

    .dashboard-table th:nth-child(3),
    .dashboard-table td:nth-child(3) {
        display: none !important;
    }
}

/* Charities Details Page */
.charity-page-header {
    background-color: var(--color-primary);
    padding-top: 95px;
    padding-bottom:50px;
    margin-bottom: 50px;
}

.socials-table .mud-table-root .mud-table-head .mud-table-cell {
    color: var(--color-tertiary);
    font-size: 16px
}

.mud-expand-panel .mud-expand-panel-header .mud-expand-panel-text {
    flex: 1 1 auto;
    font-size: 24px;
    color: white;
}

.mud-expand-panel .mud-expand-panel-header {
    background-color: var(--color-secondary);
}

div.mud-expand-panel-header.mud-expand-panel-header-gutters > svg {
    color: var(--color-accent);
}

.mud-expand-panel .mud-expand-panel-content.mud-expand-panel-gutters {
    padding-top:20px
}

.mud-charts-xaxis text, .mud-charts-yaxis text, .mud-charts-yaxis {
    font-size: 20px;
}

g.mud-charts-grid > g.mud-charts-gridlines-yaxis > path {
    stroke: var(--color-secondary);
}

/* General Stlying */
.standard-page-header {
    background-color: var(--color-primary);
    padding-top: 75px;
    padding-bottom: 50px;
    margin-bottom:25px
}


/* Gnereal overrides */
.mud-table-head {
    background-color: var(--color-secondary)
}

button.mud-button, a.mud-button {
    border-radius: 100px;
}

.mud-button-filled.mud-button-filled-info:hover {
    background-color: var(--color-primary);
}


.mud-table-root .mud-table-head .mud-table-cell {
    color: white;
}

h1:focus,
h1:focus-visible,
.mud-typography-h1:focus,
.mud-typography-h1:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

.mud-chip.mud-chip-size-medium {
    font-size: 14px;
    font-weight: 700;
}

body > div.mud-layout > header > div > div > div > div.nav-menu > nav > nav > a:active {
    background-color: transparent !important;
}

a.mud-typography.mud-link.mud-primary-text {
    color: var(--color-tertiary) !important;
}

    a.mud-typography.mud-link.mud-primary-text:hover {
        color: var(--color-accent) !important;
        text-decoration: none !important;
    }
/* Responsive heading sizes */
@media (max-width: 1025px) {
    :root {
        --h1-size: 48px;
        --h2-size: 40px;
        --h3-size: 30px;
    }
}

@media (max-width: 767px) {
    :root {
        --h1-size: 36px;
        --h2-size: 36px;
    }
}
