:root {
    --content-margin-desktop: 40px;
    --content-margin-mobile: 8px;
    --content-spacing: calc(var(--content-margin-desktop) / 2);
    --in-control-icon-left-position: 1.2rem;
    --in-control-icon-right-position: 1.2rem;
    /* FIGMA TERMS FONT WEIGHTS */
    --figma-fw-regular: 400;
    --figma-fw-medium: 500;
    --figma-fw-semibold: 600;
    --figma-fw-bold: 700;
    /* SPACING */
    --navigation-controls-spacing: 5px;
    /* Extra */
    --prw-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --prw-shadow-1: 3px 3px 16px -2px rgba(0, 0, 0, 0.05);
    --prw-shadow-2: 0px 0px 8px 0px rgba(0, 0, 0, 0.05);
    --bs-primary-border-subtle: var(--prw-primary-tint-3);
    --bs-link-color-rgb: var(--prw-primary-rgb);
    --bs-link-color: var(--prw-primary);
    --bs-form-valid-color: var(--prw-state-green);
    --bs-form-valid-border-color: var(--prw-state-green);
}

html, body {
    overflow: hidden;
    font-family: "Roboto", sans-serif;
    --bs-body-font-family: "Roboto", sans-serif;
    color: var(--prw-text-1);
}

/* BETTER RENDERING FOR TEXT AND IMAGES */

* {
    -webkit-font-smoothing: antialiased; /* Chrome, Safari, Edge */
    -moz-osx-font-smoothing: grayscale; /* Firefox on macOS */
}

svg, img {
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
}

/* GENERIC LAYOUT */

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pointer {
    cursor: pointer;
}

.vflex {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.flex-1 {
    flex: 1 1 10%;
}

.xsmall {
    font-size: 0.75rem;
    letter-spacing: -0.1px;
}

.xxsmall {
    font-size: 0.5rem;
}

@media(max-width: 768px) {
    .mobile-small {
        font-size: 0.875rem;
    }
}


.badge.xsmall {
    --bs-badge-padding-x: 0.45em;
    --bs-badge-padding-y: 0.20em;
}

.text-muted {
    color: var(--prw-text-3) !important;
}

.text-highlight {
    color: darkorange;
}

@media(max-width: 992px) {
    input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px !important; /* This prevents IOS from zooming to the input field!*/
    }
}


/* BS Tooltip styling */
.tooltip {
    --bs-tooltip-bg: var(--prw-primary);
    --bs-tooltip-padding-x: 6px;
    --bs-tooltip-padding-y: 2px;
}

.list-card-container .badge {
    padding: 0.2rem 0.25rem;
}

.badge {
    display: flex;
    align-items: center;
}

@media(max-width: 768px) {
    .badge {
        --bs-badge-padding-x: 0.25em;
        --bs-badge-padding-y: 0.25em;
        --bs-badge-border-radius: 3px;
    }
}

.container-xs {
    width: 100%;
    padding: 1.5rem;
    max-width: 700px;
    margin: auto
}

@media(max-width: 768px) {
    .container-xs {
        padding: 0rem;
    }
}

@media(max-width: 768px) {
    .bg-md-none {
        background: none !important;
    }
}

.details-list-stack {
    gap: 1.25rem;
    overflow-y: scroll;
}

@media(max-width: 768px) {
    .details-list-stack {
        overflow: hidden;
    }
}
.query-container {
    container-type: inline-size;
    flex: 1 1 0%;
    overflow-y: auto;
}

@media(max-width: 768px) {
    .page-calendar .query-container {
        overflow: hidden;
    }
}

.information-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 1rem;
}

    .information-table .label {
        font-weight: var(--figma-fw-bold);
    }

    .information-table > * {
        display: flex;
        align-items: center;
    }

        .information-table > *:nth-child(even) {
            margin-left: auto;
            text-align: right;
        }

    .information-table > .full-width,
    .table-row > .full-width {
        grid-column: 1 / -1;
    }

    .information-table > .table-aligner {
        display: none;
    }

.span-all-columns-inherit {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
}

.white-rounded-background {
    background-color: var(--bs-white);
    border-radius: 8px;    
    box-shadow: var(--prw-shadow-1);
}

.white-rounded-background:has(> .empty-page-visual-container) {
    padding:1.5rem;
}

.horizontal-rule {
    border-bottom: 2px solid var(--bs-outline);
}

/* COMMON SPACING STYLING */
.match-details-spacing {
    gap: 0.875rem;
}

.navigation-controls-spacing {
    gap: var(--navigation-controls-spacing);
}

/* TEE DISPLAY */
.tee-display {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    position: relative;
    font-weight: 500;
}

    .tee-display .tee-label {
        position: absolute;
        width: 100%;
        height: 100%;
        display: grid;
        place-content: center;
    }

    .tee-display .tee-color {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 1.5rem;
        width: 1.8rem;
        border-radius: 0.6rem;
        border: 1px solid var(--prw-text-1);
    }

@media(max-width: 768px) {
    td .tee-display, .as-row .tee-display {
        gap: 4px;
        font-size: 0.65rem;
    }
        td .tee-display .tee-color, .as-row .tee-display .tee-color {
            height: 0.9rem;
            width: 1.1rem;
            border-radius: 0.2rem;
        }
}

.tee-display .tee-color .tee-label {
    font-weight: var(--figma-fw-bold);
}

    .tee-display:has(.tee-black) .tee-label,
    .tee-display:has(.tee-red) .tee-label {
        color: var(--bs-white);
    }

    .tee-display .tee-black {
        background-color: black;
    }

    .tee-display .tee-white {
        background-color: white;
    }

    .tee-display .tee-yellow {
        background-color: var(--bs-warning);
        color: var(--prw-text-1);
    }

    .tee-display .tee-blue {
        background-color: #09A2D6;
    }

    .tee-display .tee-red {
        background-color: var(--bs-danger);
    }

    .tee-display .tee-orange {
        background-color: orange;
    }

/* STATUS DISPLAY */

.state-dot {
    width: 0.65rem;
    height: 0.65rem;
    display: inline-block;
    background-color: grey;
    border-radius: 100px;
    margin-right: 0.1rem;
}

.text-with-state {
    /* TODO Henrick*/
}

/* SOFT BACKGROUNDS */
.soft-bg {
    position: relative;
    z-index: 1;
    background-color: var(--bs-white) !important;
}

    .soft-bg::before {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        opacity: 0.2;
        z-index: -1;
    }

    .soft-bg.soft-warning::before {
        background-color: var(--bs-warning);
    }

    .soft-bg.soft-info::before {
        background-color: var(--bs-info);
    }

/* GENERIC INPUT CONTROL STYLING */

.form-control-container {
    position: relative;
}

.form-control {
    min-height: 2.5rem;
    border-radius: 4px;
    color: var(--prw-text-1);
    background-color: inherit;
    border: 1px solid var(--prw-primary-tint-4);
    font-size: 0.875rem;
    background-color: var(--prw-white);
    transition: border var(--prw-transition), background-color var(--prw-transition);
}

    .form-control:disabled {
        background-color: var(--prw-primary-tint-2);
        opacity: 0.6;
    }

@media(max-width:768px) {
    .form-control {
        min-height: 2.3rem;
    }
}

.form-control.is-valid, .was-validated .form-control:valid {
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='13' viewBox='0 0 14 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5867 0.194137C14.0336 0.519137 14.1336 1.14414 13.8086 1.59101L5.80859 12.591C5.63672 12.8285 5.37109 12.9754 5.07734 13.0004C4.78359 13.0254 4.49922 12.916 4.29297 12.7098L0.292969 8.70976C-0.0976562 8.31914 -0.0976562 7.68476 0.292969 7.29414C0.683594 6.90351 1.31797 6.90351 1.70859 7.29414L4.88047 10.466L12.193 0.412887C12.518 -0.0339881 13.143 -0.133988 13.5898 0.191012L13.5867 0.194137Z' fill='%234AD862'/%3E%3C/svg%3E%0A");
}

.form-control:focus {
    border: 2px solid var(--prw-primary-tint-4);
    background-color: var(--prw-primary-tint-2);
    box-shadow: none;
}

    .form-control::placeholder {
        color: var(--prw-text-3);
    }


.form-control.with-icon.left {
    padding-left: calc(2 * var(--in-control-icon-left-position));
}

.form-control.with-icon.right {
    padding-right: calc(2 * var(--in-control-icon-right-position));
}

.input-label-control-group {
    display: flex;
    flex-direction: column;
}

    .input-label-control-group.inline {
        flex-direction: row;
    }

.form-check-input, .form-check-input[type=checkbox] {
    background-color: white;
    border: solid 1px var(--prw-primary-tint-4);
    height: 1.3rem;
    width: 1.3rem;
    appearance: none; /* or remove this line entirely */
}

    .form-check-input:checked {
        background-color: var(--prw-primary-tint-4);
        border-color: var(--prw-primary-tint-4);
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 1rem;
    }

    .form-check-input:focus {
        border-color: var(--prw-primary-tint-4);
        box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--prw-primary-tint-4) 25%, transparent);
    }

.feedback {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    font-size: 0.875rem;
    position: relative;
    padding: 0 0.5rem;
    font-weight: 500;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.valid-feedback {
    color: var(--bs-success);
    background-color: color-mix(rgb(var(--bs-success-rgb)), white 80%);
}

.invalid-feedback {
    color: var(--bs-danger);
    background-color: color-mix(rgb(var(--bs-danger-rgb)), white 80%);
}

.fa-spinner {
    animation: spin 2s infinite linear;
}

/* SCROLLBAR */

.main-content *::-webkit-scrollbar {
    width: 4px;
}

.main-content *::-webkit-scrollbar-track {
    background: white;
    border-radius: 4px;
}

.main-content *::-webkit-scrollbar-thumb {
    background: var(--prw-primary-tint-4);
    border-radius: 4px;
}

    .main-content *::-webkit-scrollbar-thumb:hover {
        background: var(--bs-primary);
    }

/* CARD STYLING */

.card {
    background-color: var(--bs-white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.card-stack > .details-card:not(:first-child) {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.card-stack > .details-card:not(:last-child) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.details-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--prw-primary-tint-2);
}

.details-card.query-container {
    flex: auto;
}

    .details-card .card-title, .details-card .card-body, .details-card .list-container {
        padding: 0.875rem;
    }

    .details-card:has(.card-title) .card-body {
        padding-top: 0;
    }


@media(max-width: 768px) {
    .details-card .card-title, .details-card .card-body, .details-card .list-container {
        padding: 0.5rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.5rem;
        line-height: 1.2;
        font-size: 0.8rem;
    }
}

    .details-card .table {
        margin-bottom: 0;
    }

    .details-card .card-title {
        display: flex;
        flex-direction: row;
        align-items: center;
        background-color: var(--bs-lightest-grey);
        border-bottom: 1px solid var(--bs-outline);
        border-top-left-radius: inherit;
        border-top-right-radius: inherit;
    }

    .details-card .card-title > img {
        height: 40px;
    }

    .details-card .titles {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    .details-card .card-body {
        position: relative;
        overflow: hidden;
    }

        .details-card .card-body.has-overflow-overlay::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 50%;
            background: linear-gradient(180deg, transparent 0%, var(--bs-lightest-grey) 100%);
        }

        .details-card .card-body,
        .details-card .card-title.no-body {
            border-bottom-left-radius: inherit;
            border-bottom-right-radius: inherit;
            border: none;
        }

    .details-card .title {
        font-weight: var(--figma-fw-bold);
        font-size: 0.875rem;
        color: var(--prw-text-1);
    }

    .details-card .subtitle {
        font-weight: var(--figma-fw-regular);
        font-size: 0.875rem;
        color: var(--prw-text-1);
    }

.player-card.text-muted > * {
    opacity: 0.6;
}

/* ALIGNMENT */

.align-as-label {
    text-align: center !important;
}

.align-as-text {
    text-align: left !important;
}

.align-as-number {
    text-align: right !important;
}

/* VISIBILITY */

@media (max-width: 767.98px) {
    .desktop-visible {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-visible {
        display: none !important;
    }
}

@media (max-width: 1440px) {
    .laptop-visible {
        display: none !important;
    }
}

/* MODAL LAYERING */
.modal-backdrop {
    z-index: 1055;
}

.modal {
    z-index: 1060;
    place-content: center;
}

.toast-container {
    z-index: 1065;
}


/* Performance tracker styling */
.render-fast {
    outline: 2px solid rgba(0, 255, 0, 0.4);
}

.render-medium {
    outline: 2px solid rgba(255, 165, 0, 0.6);
}

.render-slow {
    outline: 2px solid rgba(255, 0, 0, 0.75);
}

/* Table Styling */

.table-striped {
    --bs-table-striped-bg: var(--prw-primary-tint-1);
    --bs-table-bg: transparent;
}

.table > tbody > tr > td {
    border: none;
    color: var(--prw-text-1);
    width: 50%;
}

@media(max-width: 768px) {
    .table > tbody > tr > td {
        padding: 0.5rem !important;
    }
}

    .table > tbody > tr > td:first-child:not(.fw-normal) {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
        font-weight: 600;
        color: var(--bs-primary);
    }

    .table > tbody > tr > td:last-child {
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
    }

.table > :not(caption) > * > * {
    padding: 0.6rem;
}

/* Skip striped bs */
.table tr.skip-striped td {
    padding: 0;
}

.table tr.skip-striped > * {
    --bs-table-bg-type: transparent !important;
}

/* SCORECARD */

.table-row.scorecard.hole-score {
    border-radius: 4px;
    color: var(--prw-text-2);
    margin: 0.2rem 0;
}

    .table-row.hole-score:nth-child(odd) {
        background-color: var(--prw-primary-tint-1);
    }

.table-row.scorecard.sum-label {
    font-weight: var(--figma-fw-bold);
    background: var(--prw-primary-tint-2);
    border-radius: 4px;
    color: var(--prw-text-1);
    margin: 0.4rem 0;
}

/* No Data */

.no-data {
    background-color: var(--prw-primary-tint-1);
    border: 1px dashed var(--prw-text-3);
}

/* Dropdown styling */

.dropdown-menu {
    padding: 0.5rem;
    color: var(--prw-text-1);
    max-height: 300px;
    overflow: auto;
    min-width: 120px;
    z-index: 1050;
}

    .dropdown-menu li {
        border-radius: 6px;
        overflow: hidden;
        font-size: 0.9rem;
    }

    .dropdown-menu li:not(:last-child) {
        margin-bottom: 0.2rem;
    }

    .dropdown-menu li:hover {
        background-color: var(--prw-primary-tint-1);
    }

.dropdown-toggle::after {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5043 5.50431C5.22537 5.78323 4.7724 5.78323 4.49347 5.50431L0.209194 1.22003C-0.0697302 0.941105 -0.0697303 0.488131 0.209194 0.209207C0.488118 -0.0697175 0.941092 -0.0697176 1.22002 0.209207L5 3.98919L8.77998 0.211437C9.05891 -0.0674872 9.51188 -0.0674872 9.79081 0.211437C10.0697 0.490362 10.0697 0.943336 9.79081 1.22226L5.50653 5.50654L5.5043 5.50431Z' fill='%23009689'/%3E%3C/svg%3E%0A");
    border: none;
    width: 16px;
    height: 7px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: auto;
    transition: .2s ease;
}

.dropdown-toggle.show:after {
    transform: rotate(180deg);
}

/* Dropdown bootstrap overrides */
.dropdown-menu .dropdown-item:hover {
    background-color: var(--prw-primary-tint-3);
}

.dropdown-menu .dropdown-item:active {
    background-color: var(--prw-primary-tint-4);
    color: var(--prw-primary);
}

/* TODO Jochem: Component? Used in registrationstepview and registrationresult */

.registration-nav:has(.btn) {
    display: flex;
}

@media(max-width: 768px) {
    .registration-nav {
        position: fixed;
        background: var(--prw-white);
        box-shadow: 0 -2px 5px 0 rgba(0, 0, 0, 0.10);
        width: 100%;
        left: 0;
        bottom: 0;
        justify-content: center;
        padding: 0 1rem;
        height: 62px;
        display: none;
    }
}

/* Filter styling */
/* TODO Jochem: Verplaats naar filterablelistpage wanneer calendar die ook gebruikt */

.filter-wrapper {
    visibility: hidden;
    pointer-events: none;
    transition: visibility .2s ease;
}

    .filter-wrapper.show {
        visibility: visible;
        pointer-events: auto;
        position: fixed;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 9999;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .filter-wrapper .filter-screen {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(4, max-content) 1fr max-content;
        row-gap: 1rem;
        column-gap: 0.5rem;
        background-color: var(--bs-white);
        position: absolute;
        bottom: 0;
        left: 1rem;
        width: calc(100% - 2rem);
        height: auto;
        z-index: 10;
        transition: transform .2s ease;
        transform: translateY(100vh);
    }

    .filter-wrapper.show .filter-screen {
        transform: translateY(0);
    }

.filter-screen .committee, .filter-screen .year, .filter-screen .title, .filter-screen .radio-filter {
    grid-column: 1 / -1;
}

.filter-screen-toggler {
    position: absolute;
    top: -1.1rem;
    right: 1rem;
}

.filter-container {
    gap: 1rem;
}

/* Registration page specific override to hide header */

@media(min-width:768px) {
    .page-calendar-match-registration .main-content > .header,
    .page-calendar-match-registration-edit .main-content > .header {
        display: none !important;
    }
}

.page-registrations .registrations-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    flex-grow: 0;
    height: auto;
}

@media(max-width:768px) {
    .page-registrations .registrations-grid {
        gap: 0.5rem;
    }
}

    .page-registrations .registrations-grid .list-card-container:not(:last-child) {
        margin-bottom: 0;
    }

@media(max-width: 768px) {
    .layout-container:not(.page-calendar-match-information) .registration-info, .layout-container:not(.page-calendar-match-information) .match-badges {
        display: none !important;
    }

    .page-calendar-match-registration-edit .main-content > .header .mobile-menu-back, 
    .page-calendar-match-registration .main-content > .header .mobile-menu-back {
        display: none !important;
    }
}

.page-calendar-match-participants .content-body {
    overflow: visible !important;
}

.page-calendar-match-participants .content-header {
    padding-top: 0.6rem;
}
