/* ==========================================================================
   shared.css — Gemensam CSS f�r AppBlazor och AppMaui
   Baserad p� AppBlazor (referens). Plattformsspecifika overrides i respektive app.
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    --clr-body-bg: hsl(0, 0%, 100%);
    --clr-card-bg: hsl(0, 0%, 100%);
    --clr-text: hsl(37, 0%, 41%);
    --clr-heading: hsl(37, 0%, 41%);
    --clr-accent: hsl(33, 88%, 64%);
    --clr-primary-btn: hsl(28, 75%, 50%);
    --clr-low: hsl(37, 33%, 95%);
}

/* --- Loading screen (CascadingAppState) --- */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #fff;
    margin: 0;
}
.app-loading img {
    max-width: 320px;
    width: 80%;
    margin-bottom: 24px;
}
.app-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: app-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
.app-loading .loading-text {
    color: var(--clr-text);
    font-family: system-ui, sans-serif;
    font-size: 14px;
}
/* Spacer ovanför bilden — kompenserar spinner+text under bilden
   så att bilden hamnar på samma vertikala position som i native splash */
.app-loading::before {
    content: '';
    height: 68px;
}
@keyframes app-spin { to { transform: rotate(360deg); } }

/* --- Base HTML elements --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    font-family: system-ui, sans-serif;
    font-size: 1.2rem;
    line-height: 1.5;
    background: var(--clr-body-bg);
    color: var(--clr-text);
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--clr-heading);
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 35px;
    padding-left: 8px;
    font-weight: 600;
}

header img {
    height: 30px;
}

section {
    flex-grow: 1;
    overflow-y: auto;
}

footer {
    height: 0px;
    background-color: var(--clr-heading);
    flex-shrink: 0;
}

h2 {
    font-size: 1.5rem;
    text-align: left;
    color: var(--clr-text);
}

h3 {
    font-size: 1.2rem;
    text-align: left;
    color: var(--clr-text);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* --- Buttons --- */
.btn-primary {
    color: white;
    background-color: var(--clr-accent);
    border-color: var(--clr-accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn-round {
    border-radius: 5px;
}

.btn-primary.enlarged {
    font-size: 1.5rem;
    padding: 10px 20px;
}

/* --- Form/validation --- */
.mincontent {
    padding: 0px 0px 0px 0px !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* --- Reconnect modal --- */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying {
    display: flex;
}

#components-reconnect-modal p,
#components-reconnect-modal button {
    display: none;
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

#components-reconnect-modal.components-reconnect-show p.components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show p.components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-show p.components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-show button.components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal button {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    border: 2px solid white;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}

#components-reconnect-modal button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- 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;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* --- Layout helpers --- */
.box {
    background-color: lightblue;
}

.meny-container {
}

.meny-button {
    height: 15vmin;
    width: 100%;
    font-size: 6vmin;
    display: flex;
    justify-content: center;
    align-items: center;
}

.meny-col {
    padding: 3vmin 3vmin 3vmin 3vmin;
    vertical-align: top;
}

.contcontainer {
    height: 100%;
    background-color: lightgreen;
}

.contenttab {
    height: calc(100vh - 55px);
}

.contenthead {
    height: 100px;
    background-color: orange;
}

.contentfoot {
    height: 100px;
    background-color: cadetblue;
}

.tabcontainer {
    margin: 0px 0px 0px 0px;
    padding: 0px 0px 0px 0px;
}

.fill {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.hidden {
    visibility: hidden;
}

/* --- CykelBox header (first declaration, then override) --- */
.cykelbox-header {
    color: white;
    height: 55px;
    background-color: blue;
    text-align: left;
    font-weight: 400;
    font-size: 20px;
    padding: 10px 10px 10px 15px;
    vertical-align: middle;
}

.cykelbox-header {
    background-color: transparent;
    color: black;
    text-align: center;
    font-weight: 400;
    font-size: 10px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

.cykelbox-component {
    display: inline-block;
    height: fit-content;
    width: fit-content;
}

.garage-component {
}

.cykelbox-free {
}

.cykelbox-allocated {
    background-color: lightpink;
}

.rotateimg180 {
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}

/* --- Syncfusion input styling --- */
.rent-site-shortid {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 120px;
    text-align: center;
}

.e-custom.e-input-group,
.e-custom.e-input-group.e-control-wrapper,
.e-custom.e-float-input,
.e-custom.e-float-input.e-input-group,
.e-custom.e-float-input.e-control-wrapper,
.e-custom.e-float-input.e-input-group.e-control-wrapper {
    text-align: center !important;
    font-size: 30px;
    color: #342628;
}

.e-custom.e-control-wrapper .e-textbox {
    text-align: center;
}

.e-float-input.e-control-wrapper:not(.e-error) input:valid ~ label.e-float-text, .e-float-input.e-control-wrapper:not(.e-error) input ~ label.e-label-top.e-float-text {
    color: #788402;
    font-size: 15px;
}

.e-custom.e-float-input.e-input-group:not(.e-float-icon-left) .e-float-line::before,
.e-custom.e-float-input.e-control-wrapper.e-input-group:not(.e-float-icon-left) .e-float-line::before,
.e-custom.e-float-input.e-control-wrapper.e-input-group:not(.e-float-icon-left) .e-float-line::after,
.e-custom.e-float-input.e-input-group:not(.e-float-icon-left) .e-float-line::after {
    background: #788402;
}

/* --- Syncfusion tab styling --- */
.e-tab {
    border: 0px solid var(--clr-heading);
}

.e-tab.e-fill .e-tab-header {
    border-bottom: 2px Solid var(--clr-accent);
}

.e-tab.e-fill .e-tab-header .e-toolbar-item.e-active .e-tab-wrap {
    background: var(--clr-accent);
    border-radius: 0;
    border-color: unset;
}

.e-tab .e-tab-header .e-toolbar-items {
    background: var(--clr-low);
}

.e-tab .e-tab-header {
    background: var(--clr-low);
}

/* --- Rent/booking component styles --- */
.rent-site-shortid-textbox {
    background-color: pink;
    text-align: center;
    font-size: 50px;
}

.rent-site-name {
    text-align: center;
    font-size: 20px;
}

.rent-city-name {
    text-align: center;
    font-size: 16px;
}

.rent-site-image {
    text-align: center;
    height: 150px;
}

.rent-button {
    text-align: center;
    padding: 5px 5px 5px 5px;
}

.rent-msg {
    text-align: center;
    font-size: 20px;
}

.rent-dialog-message1 {
    font-size: 15px;
    padding: 5px 5px 5px 5px;
    text-align: center;
}

.rent-dialog-message2 {
    font-size: 25px;
    padding: 5px 5px 5px 5px;
    text-align: center;
}

.rent-dialog-message3 {
    font-size: 25px;
    padding: 5px 5px 5px 5px;
    text-align: center;
}

.rent-dialog-box {
    padding: 5px 5px 5px 5px;
    text-align: center;
}

/* --- Site component styles --- */
.site-h1 {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 18px;
    height: fit-content;
    padding: 1px 1px 10px 1px;
    vertical-align: middle;
    width: 100%;
}

.site-site {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 800;
    font-size: 28px;
    height: fit-content;
    padding: 1px 1px 20px 1px;
    vertical-align: middle;
    width: 100%;
}

.site-info {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 16px;
    height: fit-content;
    line-height: 32px;
    padding: 1px 1px 30px 1px;
    vertical-align: middle;
    width: 100%;
}

.site-imgcell {
    height: 160px;
    text-align: center;
    vertical-align: top;
    margin-top: 0px;
    padding-top: 0px;
}

/* --- Box component styles --- */
.box-col {
    align-self: center;
    padding: 0px 0px 0px 0px;
    vertical-align: top;
    width: 100%;
    max-width: 400px;
}

.box-h1 {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 800;
    font-size: 24px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

.box-imgcell {
    height: 400px;
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.box-img {
    max-width: 100%;
    max-height: 100%;
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.box-text {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 20px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

.box-btn-next {
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 20px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
    position: relative;
    animation: popOut 0.3s ease-out;
}

.box-btn-prev {
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 20px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
    position: relative;
}

/* --- Action component styles --- */
.action-col {
    align-self: center;
    padding: 0px 0px 0px 0px;
    vertical-align: top;
    width: 100%;
    max-width: 400px;
}

.action-h1 {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 800;
    font-size: 24px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

.action-imgcell {
    height: 400px;
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.action-img {
    max-width: 100%;
    max-height: 100%;
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.action-text {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 22px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

/* --- City component styles --- */
.city-col {
    align-self: center;
    padding: 0px 0px 0px 0px;
    vertical-align: top;
    width: 100%;
    max-width: 400px;
}

.city-imgcell {
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.city-img {
    max-width: 100%;
    max-height: 100%;
    text-align: center;
    vertical-align: middle;
    margin-top: 0px;
    padding-top: 0px;
}

.city-text {
    background-color: transparent;
    color: var(--clr-text);
    text-align: center;
    font-weight: 400;
    font-size: 20px;
    height: fit-content;
    padding: 1px 1px 1px 1px;
    vertical-align: middle;
    width: 100%;
}

/* --- About/Text component styles --- */
.about-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
    padding: 10px;
}

.about-title {
    font-size: 12px;
    font-weight: bold;
    margin-top: 10px;
}

.about-text {
    font-size: 11px;
    font-weight: normal;
}

@media screen and (min-width: 768px) {
    .about-title {
        font-size: 16px;
        margin-top: 20px;
    }

    .about-text {
        font-size: 14px;
    }
}

/* --- Syncfusion button overrides --- */
.e-btn {
    font-size: 12px;
    font-weight: 500;
    text-transform: none !important;
}

.e-btn.e-primary {
    background-color: var(--clr-primary-btn) !important;
    border-color: var(--clr-primary-btn) !important;
    color: hsl(0, 0%, 100%) !important;
}

.e-btn.e-primary:hover {
    background-color: hsl(38, 90%, 45%) !important;
}

/* --- Syncfusion dialog styling --- */
.e-dialog .e-dlg-header-content {
    background-color: var(--clr-accent);
    margin: 0px 0px 20px 0px;
    padding: 3px;
}

.e-dialog .e-dlg-header {
    color: white;
    font-size: 20px;
    font-weight: normal;
    margin: 0px;
    padding: 0px;
    text-align: center;
    width: 100%;
}

/* --- Content container base --- */
.content-container {
    width: 100%;
    max-width: inherit;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

/* --- Animation --- */
@keyframes popOut {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}
