/* MudBlazor supplies the component styling; this file covers only what sits outside it. */

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

/* Scrollable product list on the Glazing tab. */
.product-list-scroll {
    max-height: 62vh;
    overflow-y: auto;
}

/* Order rows respond to the pointer so it is obvious they open a detail view. */
.clickable-row {
    cursor: pointer;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1050;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Window designer on the Double Glazing tab. The drawing's own styles (fills, strokes, labels)
   live inside the SVG in WindowPreview.razor so a captured copy renders the same; only layout is here. */
.window-preview {
    display: block;
    width: 100%;
    margin: 0 auto;
}

/* The captured drawing shown against a basket line or an order line. */
.window-thumb {
    width: 160px;
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fbfbf8;
}

.window-thumb-placeholder {
    width: 160px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Colour swatches on the pricing tab and in the designer's colour picker. */
.colour-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    vertical-align: middle;
}

.frame-colour-picker {
    width: 44px;
    height: 36px;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

/* The designer's drawing area: clicking anywhere that is not a section selects the frame. */
.design-window {
    cursor: default;
}

/* House photograph and its generated visualisation on the quote screen. */
.house-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Tagging windows on the house photograph: numbered marks laid over the picture. */
.tag-photo {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
}

.tag-photo img {
    cursor: crosshair;
}

.tag-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f6d8c;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    font: 600 13px/24px 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    pointer-events: none;
}

.tag-marker.unassigned {
    background: #c77700;
}

/* Window outlines drawn over the house photograph. The overlay works in a 0-1 space so an
   outline sits on the same part of the picture whatever size it is displayed at. */
.tag-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tag-overlay .tag-quad {
    fill: rgba(15, 109, 140, 0.18);
    stroke: #0f6d8c;
    stroke-width: 2px;
    stroke-linejoin: round;
}

.tag-overlay .tag-quad.unassigned {
    fill: rgba(199, 119, 0, 0.18);
    stroke: #c77700;
}

.tag-overlay .tag-quad.in-progress {
    fill: none;
    stroke-dasharray: 6 4;
}

/* A corner placed while an outline is being drawn. */
.tag-corner {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0f6d8c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Sign-in and access-denied pages: standalone, centred, no app chrome around them. */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #eef2f5;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5a6a72;
    margin-bottom: 4px;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    background: #fff;
}

.login-input:focus {
    outline: none;
    border-color: #0f6d8c;
    box-shadow: 0 0 0 2px rgba(15, 109, 140, 0.2);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #5a6a72;
    margin-bottom: 20px;
    cursor: pointer;
}

.login-button {
    width: 100%;
    padding: 11px;
    font: 500 0.95rem 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #fff;
    background: #0f6d8c;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-button:hover { background: #0d5b75; }

/* The signed-in user and sign-out control in the top bar. */
.signed-in-as {
    display: flex;
    align-items: center;
    gap: 8px;
}
