:root {
    /*colors*/
    --fog-background-color: #FFFAEB;
    --fog-surface-color: #FFFFFF;
    --fog-surface2-color: #FCF0CE;
    --fog-container-color: #DEC78E;
    --fog-outline-on-container2-color: #329AB4;
    --fog-navigation-bar-color: #316896;
    --fog-footer-color: #324657;
    --fog-icon-color: #34495E;
    --fog-icon-on-dark-color: #FFFFFF;
    --fog-accent-color: #54A1FF;
    --fog-border-color: #F0F0F0;
    --fog-button-color: #968657;
    --fog-button-color-hover: #bdaa79;
    --fog-button-selected-color: #635326;
    --fog-button-secondary-color: #6C79A7;
    --fog-button-secondary-color-hover: #5E6069;
    --fog-button-secondary-color-selected: #5E6069;
    /*--fog-hero-background-color: #7B8B6F;*/
    --fog-hero-background-color: #7b886e;
    --fog-hero-background-border-color: #4F5947;
    --fog-link-color: #939632;
    --fog-positive-selection-color: #CFFCEF;
    --fog-text-color: #34495E;
    --fog-text-secondary-color: #9EA9B3;
    --fog-text2-color: #7D6C3C;
    --fog-text-accent-color: #7D6C3C;
    --fog-text-on-dark-color: #FFFFFF;
    --fog-text-on-background-color: #C38B2E;
    --fog-text2-on-background-color: #C7B788;
    --fog-text-on-container-color: #5B451C;
    --fog-text-on-container2-color: #A7E0EB;
    --fog-units-green-color: #35CF2E;
    --fog-units-red-color: #FF4B32;
    --fog-units-yellow-color: #FFAA00;
    --fog-units-blue-color: #479AFF;
    --fog-units-purple-color: #7C3BE8;
    --fog-units-neutral-color: #c0c0c0;
    --fog-chart-line-color: #329AB4;
    --fog-error-color: #963532;
    --fog-victory-color: #268a1c;
    --fog-defeat-color: #c42626;
    --fog-player-color: #3672be;
    --fog-enemy-color: #ba3a36;

    /*values*/
    --fog-border-radius: 0.5rem;
    --main-font-family: "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html {
    font-family: var(--main-font-family), sans-serif;
    background-color: var(--fog-background-color);
    color: var(--fog-text-color);
}

body {
    font-size: 0.875rem !important;
    background-color: inherit !important;
    color: inherit !important;
    font-family: inherit !important;
    position: relative;
}

a, .btn-link {
    color: var(--fog-link-color);
}

.btn, .btn-primary, .btn-sm, .btn-lg, .btn-xl {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-color);
    border-color: var(--fog-button-selected-color);
    border: none;
}

.btn:hover, .btn-sm:hover, .btn-lg:hover, .btn-xl:hover {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-color-hover);
    border: none;
}

.btn:checked, .btn-sm:checked, .btn-lg:checked, .btn-xl:checked {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-selected-color);
    border: none;
}

.btn:focus, .btn-sm:focus, .btn-lg:focus, .btn-xl:focus {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-selected-color);
    border: none;
}

.btn-secondary {
    background-color: var(--fog-button-secondary-color);
    color: var(--fog-text-on-dark-color);
}

.btn-secondary:hover {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-secondary-color-hover);
    border: none;
}

.btn-secondary:checked {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-secondary-color-selected);
    border: none;
}

.btn-secondary:focus {
    color: var(--fog-text-on-dark-color);
    background-color: var(--fog-button-secondary-color-selected);
    border: none;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0P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5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

hr {
    color: var(--fog-border-color);
    opacity: 1;
}

h3 {
    color: var(--fog-text-color);
    font-size: 1.25rem;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

h4 {
    color: var(--fog-text-color);
    font-size: 1.25rem;
    font-weight: 400 !important;
    text-transform: uppercase !important;
}

input[type="radio"] {
    accent-color: var(--fog-icon-color);
}

input[type="radio"]:checked {
    accent-color: var(--fog-icon-color);
}

.fog-container {
    background-color: var(--fog-surface-color);
    border-radius: var(--fog-border-radius);
    border: 1px solid var(--fog-border-color);
}

.btn-group {
    height: 44px;
}

.btn-group .btn-check:hover + .btn {
    background-color: var(--fog-button-color-hover)
}

.btn-group .btn-check:checked + .btn {
    background-color: var(--fog-button-selected-color)
}

.btn-group label {
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

.btn-group img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.hero-ability-basestat {
    color: var(--fog-accent-color);
    font-weight: 700 !important;
}

.fog-icon-light {
    color: var(--fog-icon-on-dark-color) !important;
}

.fog-icon-dark {
    color: var(--fog-icon-color);
}

.main-layout-main-content {
    display: flex;
    flex-direction: column;
    padding: 8px !important;
}

/*city planner start*/
.building-type-icon {
    display: inline-block; 
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}
.building-type-icon-home {
    background-image: url("images/icon_flat_home.png");
}
.building-type-icon-farm {
    background-image: url("images/icon_flat_farm.png");
}
.building-type-icon-barracks {
    background-image: url("images/icon_flat_barracks.png");
}
.building-type-icon-culture-site {
    background-image: url("images/icon_flat_cultureSite.png");
}
.building-type-icon-special {
    background-image: url("images/icon_flat_special.png");
}
.building-type-icon-workshop {
    background-image: url("images/icon_flat_workshop.png");
}
.building-type-icon-expedition-pier {
    background-image: url("images/icon_flat_expeditionPier.png");
}
.building-type-icon-quarry {
    background-image: url("images/icon_flat_quarry.png");
}
.building-type-icon-aviary {
    background-image: url("images/icon_flat_aviary.png");
}
.building-type-icon-rice-farm {
    background-image: url("images/icon_flat_riceFarm.png");
}
.building-type-icon-expansion {
    background-image: url("images/icon_flat_expansion.png");
}
.building-type-icon-gold-mine {
    background-image: url("images/icon_flat_goldMine.png");
}
.building-type-icon-irrigation {
    background-image: url("images/icon_flat_irrigation.png");
}
.building-type-icon-papyrus-field {
    background-image: url("images/icon_flat_papyrusField.png");
}
.building-type-icon-beehive {
    background-image: url("images/icon_flat_beehive.png");
}
.building-type-icon-fishing-pier {
    background-image: url("images/icon_flat_fishingPier.png");
}

.city-planner-appbar {
    grid-column: 1 / -1;  /* Spans full width (both columns) */
}

.city-planner-appbar-brand {
    color: var(--fog-text-on-dark-color);
    font-size: 1rem;
    padding-left: 12px;
    padding-right: 24px;
    text-decoration: none;
}

.city-planner-toolbar {
    gap: 6px;
}

.city-planner-buildings-selector-container {
    grid-column: 1 / 2;   /* First column */
}

.city-planner-map-container {
    grid-column: 2 / 3;  /* Second column */
    position: relative;
}

.city-planner-properties-container {
    grid-column: 3 / -1;   /* Third column to end */
    width: 300px;
}

.city-planner-map-container canvas {
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: none;
}

.city-planner-map-container canvas:focus {
    outline: none;
}

.city-planner-side-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - (var(--mud-appbar-height) - var(--mud-appbar-height) / 4));
    overflow-y: auto;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    padding: 8px;
}

.buildings-selector-tabs {
    background-color: #36536C;
}

.building-selector-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fog-surface-color);
    border-radius: var(--fog-border-radius);
    border: 1px solid var(--fog-border-color);
    color: var(--fog-text-color);
    cursor: pointer;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    width: 120px;
}
/*city planner end*/

.dialog-blur-bg {
    backdrop-filter: blur(10px);
}

.building-customization-selector-input {
    font-size: 12px !important;
    font-weight: 400 !important;
    font-family: inherit !important;
}

.building-customization-selector-list {
    font-size: 12px !important;
    font-weight: 400 !important;
    font-family: inherit !important;
}

/*command center start*/

.command-center-app-bar {
}

.command-center-toolbar {
    gap: 6px !important;
}

.static-main-layout-main-content {
    display: flex;
    flex-direction: column;
    padding: 8px !important;
}

.command-center-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    padding: 12px;
}

.command-center-card {
    background-color: var(--fog-surface-color);
    border-radius: var(--fog-border-radius);
    border: 1px solid var(--fog-border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.command-center-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.command-center-card-label {
    font-size: 1rem;
    text-align: center;
}

.command-center-card.command-center-action-card {
    border: 4px dashed var(--fog-border-color);
}

.command-center-card-icon {
    font-size: 32px;
    margin-bottom: 1rem;
}

img.command-center-card-icon {
    width: 32px;
    aspect-ratio: 1/1;
    object-fit: contain;
    margin-bottom: 1rem;
}



.cc-page-container {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    gap: 12px;
}

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

/*command center end*/

/*mudblazor overrides*/
.mud-input-control>.mud-input-control-input-container>.mud-input-label-inputcontrol{
    font-size: 14px !important;
}
/*mudblazor overrides end*/

/*help start*/

.help-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    line-height: 1.6;
    background-color: var(--fog-surface-color);
    border-radius: var(--fog-border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 12px;
    max-width: 1200px;
    align-self: center;
}

.help-step {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: var(--fog-border-radius);
}

.help-step h3 {
    color: #2c5282;
    margin-top: 0;
}

.help-info, .help-note {
    padding: 12px;
    background-color: #ebf8ff;
    border-radius: var(--fog-border-radius);
    border-left: 4px solid #4299e1;
}

.help-note {
    background-color: #f0fff4;
    border-left: 4px solid #48bb78;
}

.help-note h2 {
    color: #2f855a;
    margin-top: 0;
}

.help-table-of-contents {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/*help end*/


@media (min-width: 576px) {
    .main-layout-main-content {
        padding: 12px !important;
    }
    
    .static-main-layout-main-content {
        padding: 12px !important;
    }

    .cc-page-container {
        padding: 16px 0;
        gap: 16px;
    }

    .command-center-grid-container {
        gap: 16px;
        padding: 16px;
    }

    .command-center-card.command-center-action-card {
        border: 2px dashed var(--fog-border-color);
    }
    
    /*help start*/

    .help-container {
        gap: 24px;
        padding: 24px;
    }

    .help-step {
        padding: 24px;
    }

    .help-info, .help-note {
        padding: 24px;
    }

    .help-table-of-contents {
        gap: 16px;
    }

    /*help end*/
}