@import url('bootstrap-icons/font/bootstrap-icons.css');

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff !important;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

html, body, .page {
    height: 100%;
}

h1, h2, h3, h4 {
    margin: 0.5rem 0;
}

a {
    color: #1b6ec2;
}

.text-danger {
    color: #dc3545;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 0.75rem 0;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.hide {
    display: none !important;
}

/* Touch-friendly defaults for field use */
button, [role="button"] {
    touch-action: manipulation;
}

.no-print {
}

@media print {
    .no-print {
        display: none !important;
    }
}

#blazor-error-ui {
    display: none;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

/* ── Main content area ── */
.page > .main > .content {
    padding: 0 !important;
    position: relative;
    height: 100%;
    overflow: auto;
    background: #fff;
}

@media (max-width: 640.98px) {
    .page > .main > .content {
        height: calc(100% - 3.5rem);
        top: 3.5rem;
    }
}

/* ── Login page responsive ── */
/* Desktop: centered card */
@media (min-width: 769px) {
    .login {
        max-width: 450px;
        width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Mobile: full-width */
@media (max-width: 768px) {
    .login {
        max-width: none;
        margin: 0 !important;
    }
}

/* ── Fixed footer bar (submit/cancel buttons) ── */
.footer-fixed {
    position: fixed;
    left: 0;
    width: 100%;
    bottom: 0;
    text-align: center;
    z-index: 99;
}

.footer-fixed .list-group-item {
    padding: .75rem 0.5rem;
}

@media (min-width: 641px) {
    .footer-fixed {
        left: 250px;
        width: calc(100% - 250px);
    }

    /* Full-screen capture popup: on tablet/desktop the sidebar stays visible
       (old mc iField behaviour — the capture UI lives in the content area),
       so the overlay only covers the content region right of the sidebar.
       The standard .footer-fixed offset then lines up with the popup exactly.
       On phones (<=640px) the sidebar collapses and the popup stays full-screen. */
    .capture-popup {
        left: 250px !important;
        width: calc(100% - 250px) !important;
    }
}

/* ── FluentUI confirmation dialog buttons (centered, spaced, larger) ── */
.fluent-dialog-footer.stack-horizontal {
    justify-content: center !important;
    column-gap: 32px !important;
}

.fluent-dialog-footer fluent-button {
    min-width: 110px;
    height: 44px;
    font-size: 1.1rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.loading-overlay img {
    width: 60px;
    height: 60px;
}

/* ── Picture panel ── */
.div_camera {
    position: relative;
    width: 100%;
    height: 6rem;
}

.div_picture {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    height: 8rem;
}

.div_picture > img {
    width: 100%;
    border-radius: 3px;
    object-fit: cover;
    height: 100%;
}

.div_picture > .btnDeleteImage {
    font-size: 1.5rem;
    border: 2px solid #ffc107;
    border-radius: 50%;
    color: #ffc107;
    padding-top: 1px;
    width: 2.3rem;
    height: 2.3rem;
    display: inline-block;
    text-align: center;
    position: absolute;
    right: -5px;
    top: -1rem;
    background: rgba(255,255,255,0.8);
}

.div_preview {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1050;
}

.div_preview > img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.div_circular {
    position: relative;
    border: 3px solid #ffc107;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin: 0 auto;
    text-align: center;
}

.div_circular > i {
    font-size: 3.2rem;
    color: #ffc107;
}

/* ── begin Complaint detail ── */
.badge {
    display: inline-block;
    padding: 3px 7px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.btnNotesToOffice {
    height: 60px;
    color: #fff !important;
    position: relative;
}

.btnNotesToOffice > span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
}

.div_line small {
    font-style: italic;
}

.div_line small:before {
    content: '\2014 \00A0';
}

.highlighted {
    background-color: yellow !important;
    transition: background-color 0.25s ease 0s;
}

.card-body {
    padding: 0.75rem 1.25rem;
}

.photo-browse-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 8px;
}

.photo-list-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.photo-list-item.urgent {
    border-left: 0.45rem solid #e74a3b;
}

fluent-select.highlighted-select::part(listbox),
fluent-select.highlighted-select::part(control) {
    background: yellow;
}

fluent-select.highlighted-select::part(selected-value) {
    background: yellow;
}
/* ── end Complaint detail ── */

/* Date picker clear button (Mobiscroll) */
.search-clear {
    font-size: 18px;
    font-weight: bold;
    color: #466ba9;
    text-shadow: 0px 0 2px #466ba9;
    width: 30px;
    position: absolute;
    bottom: 0;
    right: 5px;
    text-align: center;
    cursor: pointer;
    height: calc(1.5em + .5rem);
}

