html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Mobile Device Block Overlay */
#mobile-block-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--mud-palette-background);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
}

.mobile-block-content {
    max-width: 320px;
    color: #ffffff;
}

.mobile-block-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
}

#mobile-block-overlay h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    
    background: linear-gradient(90deg,
            #5FC3FF,
            #8A79F2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

#mobile-block-overlay p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.85);
}

.mobile-block-suggestion {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 1.5rem !important;
}

@media (max-width: 767px) {
    #mobile-block-overlay {
        display: flex;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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;
}

.content {
    padding-top: 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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OT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jkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


.mud-input {
    
    padding: 2px 2px 2px 8px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-in-slow {
    animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Opacity only — deliberately no transform. The translateY here went 0px → 0, so it moved
   nothing, but a non-none transform makes the element a containing block for its
   position:fixed descendants. Any fixed child of a .fade-in wrapper was therefore anchored
   to the wrapper for the first 0.5s and snapped to the viewport when the animation ended
   (the Analyse icon on /market/{id} visibly jumped on load). */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.zoom-on-hover {
    object-fit: cover;
    transition: transform 0.7s ease, box-shadow 0.5s ease;
}

.zoom-on-hover:hover {
    transform: scale(1.0);
    box-shadow: 0px 12px 12px rgba(0,0,0,0.2);
    z-index: 1;
}

.zoom-crop:hover {
    transform: scale(1.1)
}

@keyframes zoom-in {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoom-in 0.6s ease-out forwards;
}

.rating-container {
    width: 100%;
    height: 10px !important;
    background-color: var(--mud-palette-background);
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar {
    height: 6px !important;
    margin: 2px 2px  !important;
    border-radius: 5px; 
    transition: width 1s ease-in-out;
}

.donut-chart-container {
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--mud-palette-surface-dark);
    border-radius: 50%;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 10;
}

.donut-segment {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round; /* Rundade kanter */
    transition: stroke-dashoffset 1s ease-in-out;
}

.donut-text {
    font-size: 18px;
    fill: white;
    font-weight: bold;
    transform: rotate(90deg);
}

.venn-diagram {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.tooltip-text {
    fill: white;
    font-size: 14px;
    pointer-events: none;
    text-shadow: 0 0 2px black;
    padding:20px;
    z-index: 100;
}

.radial-chart {
    width: 200px;
    height: 200px;
    display: block;
    margin: auto;
    background-color: var(--mud-palette-surface-dark);
    border-radius: 50%;
}

.tooltip-fade {
    animation: tooltip-fade-in 0.25s ease-in;
}

/* Semicircular gauge (AnimatedGaugeMatchChart) */
.gauge-chart {
    position: relative;
    /* Room above for a hovered band to grow into and for the tooltip, and below so the legend
       does not sit right on the flat edge of the gauge. */
    margin: 12px auto 16px;
}

.gauge-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* The sweep is a rotation about the gauge's centre, which the browser interpolates on its own —
   no per-frame render from the server. transform-box: view-box puts the origin in viewBox units,
   so it lines up with the centre the paths are drawn around. */
.gauge-layer {
    transform-box: view-box;
    transform-origin: 100px 98px;
    transition: d 0.2s ease-out, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-layer-reference {
    pointer-events: none;
}

.gauge-tooltip {
    position: absolute;
    transform: translate(-50%, -140%);
    padding: 4px 12px;
    border-radius: 999px;
    background-color: rgba(var(--mud-palette-surface-rgb), 0.95);
    color: var(--mud-palette-text-primary);
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    animation: tooltip-fade-in 0.2s ease-in;
    z-index: 2;
}

/* Narrow columns cannot fit a one-line tooltip: wrap it inside the chart's own width instead. */
.gauge-tooltip-compact {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

@keyframes tooltip-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

   .hover-card {
        border-radius: 12px;
        box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.08);
        transition: transform 0.5s ease, box-shadow 0.5s ease;
    }

    .hover-card:hover {
        transform: scale(1.02);
        box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.2);
    }

.donut-wrapper {
    position: relative;
    width: 200px;
    height: 100px;
    margin: auto;
    background-color: var(--mud-palette-surface-dark);
    border-radius: 100px 100px 0 0;
    overflow: hidden;
}

.donut {
    width: 100%;
    height: 100%;
    transform: rotate(0deg); /* Nu rättvänd! */
}

.donut-bg {
    fill: none;
    stroke: rgba(0,0,0,0.3); /* Mörkare kontrast */
    stroke-width: 16;
    stroke-linecap: round;
}

.donut-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s ease;
}

.donut-center {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--mud-palette-text-disabled);
}

/* ── eBay wordmark (used by EbayLogo component) ── */
.ebay-logo {
    font-weight: 900;
    letter-spacing: -.5px;
    display: inline-block;
    line-height: 1;
}
.ebay-logo .ebay-e { color: #e53238; }
.ebay-logo .ebay-b { color: #0064d2; }
.ebay-logo .ebay-a { color: #f5af02; }
.ebay-logo .ebay-y { color: #86b817; }

/* ── Wrapper behind brand logos (EbayLogo / DhgateLogo / AliexpressLogo) ── */
/* Transparent: the wordmarks are light/coloured and sit directly on the dark cards. */
.brand-logo-pill {
    display: inline-flex;
    align-items: center;
    background: transparent;
    line-height: 0;
}
