/* =========================================================
   OPRA — Global Styles (cleaned & de-duplicated)
   - Safe variables
   - Base/reset & typography
   - Utilities (spacing only where used)
   - Status & alerts
   - Modals
   - Forms (scoped)
   - Checkbox/Radio (scoped)
   - Validation
   - Blazor error UI
   - Calendar
   - Local grid (scoped to .form-wrapper to avoid Bootstrap conflicts)
   ========================================================= */

/* -------------------- Variables -------------------- */
:root {
    --brand-primary: #007dfc;
    --brand-navy: #002347;
    --text-body: #000;
    --text-muted: #767987;
    --text-muted-2: #465462;
    --border: #d1dbe5;
    --border-2: #a1aebc;
    --bg-page: #ebeff3;
    --bg-card: #fff;
    --accent: #ea6d00;
    --success: #26b050;
    --danger: #b32121;
}

/* -------------------- Imports -------------------- */
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* -------------------- Base / Reset -------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg-page);
    color: var(--text-body);
    font: 400 16px/1.5 "Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

h1:focus {
    outline: none;
}

p {
    color: var(--text-muted);
    margin-bottom: 0;
}

a {
    text-decoration: none;
    transition: all .3s;
}

    a:hover {
        text-decoration: none;
    }

button {
    font-family: inherit;
    transition: all .3s;
}

    input:focus, button:focus, textarea:focus {
        outline: none;
    }

/* -------------------- Utilities (small, non-conflicting) -------------------- */
.pt-4 {
    padding-top: 16px;
}

.pt-2-5 {
    padding-top: 10px;
}

.pt-6 {
    padding-top: 24px;
}

.mt-7 {
    margin-top: 28px;
}

.mb-3-5 {
    margin-bottom: 14px;
}

.mb-2-5 {
    margin-bottom: 10px;
}

strong {
    font-weight: 600;
}

/* Avoid clashing with header/layout .content classes elsewhere */
.page .content {
    padding-top: 1.1rem;
}

/* -------------------- Status & Alerts -------------------- */
.status-active {
    color: green;
}

.status-inactive {
    color: red;
}

.alert-sm {
    font-size: .875rem;
    padding: .25rem .5rem;
}

/* -------------------- Validation -------------------- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* -------------------- Modals (generic) -------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
}

    .modal.show {
        display: block;
    }

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
}

.modal-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .3rem;
    position: relative;
}

/* Modal widths */
.modal-lg {
    max-width: 90%;
}

.modal-md {
    max-width: 70%;
}

.modal-sm {
    max-width: 50%;
}

.modal-default {
    max-width: 60%;
}

/* -------------------- Blazor error UI -------------------- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    left: 0;
    position: fixed;
    width: 100%;
    padding: .6rem 1.25rem .7rem;
    z-index: 1000;
    display: none;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: .75rem;
        top: .5rem;
    }

.blazor-error-boundary {
    background: #b32121 url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0ZGRTUwMCIgZD0iTTI2My41MDYgNTFjMS4yMSAwIDIuMzA2LjQ4MyAzLjA5OSAxLjI2N2wuNDQ2LjUzOS40ODcuODMwIDIyLjY0NiAzOC41NTJjLjM2LjYxNS40Ny44MTYuNDk4IDEuMzc3LjIyMS41MTYuMzQzIDEuMDg0LjM0MyAxLjY4MSAwIDIuMzg3LTIuMDYyIDQuMzIyLTQuNDgzIDQuMzIySDI0MC4zODNjLTIuNDIgMC00LjM4My0xLjkzNS00LjM4My00LjMyMiAwLS4yOTMuMDMxLS41ODQuMDk5LS44NjhsLjI0OS0uNzkxLjUyMi0uODg1IDIyLjYxNS0zOC41MDYuNDg4LS44MzguNTA3LS45OThjLjczLTEuMTA5IDEuODI1LTEuNTg2IDMuMDM2LTEuNTg2eiIvPjwvc3ZnPg==) no-repeat 1rem/1.8rem;
    color: #fff;
    padding: 1rem 1rem 1rem 3.7rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* -------------------- Calendar -------------------- */
#calendar {
    width: 100%;
    height: 500px;
}

/* -------------------- Buttons / Focus ring -------------------- */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    /* same ring across the app */
    box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem #258cfb;
}

/* =========================================================
   Forms + Blocks (scoped so they don’t bleed globally)
   ========================================================= */
.form-wrapper {
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin: 20px 18px;
    border-radius: 8px;
}

    /* Header inside form wrapper (not the site header) */
    .form-wrapper header {
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 24px 20px;
    }

    .form-wrapper .header-left h1 {
        color: var(--brand-navy);
        font-size: 20px;
        font-weight: 600;
        line-height: 30px;
        margin-bottom: 2px;
    }

    .form-wrapper .header-left p {
        color: var(--text-muted-2);
        font-size: 13px;
        line-height: 20px;
    }

        .form-wrapper .header-left p span {
            font-weight: 600;
        }

    .form-wrapper .header-right .btn-submit {
        background: var(--brand-primary);
        border-color: var(--brand-primary);
        color: #fff;
        width: 168px;
        height: 48px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        cursor: pointer;
    }

        .form-wrapper .header-right .btn-submit img {
            margin-right: 6px;
        }

.request-block {
    padding: 20px 20px 28px;
    border-bottom: 1px solid var(--border);
}

.request-block-another {
    border-bottom: none;
}

.title {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand-navy);
    line-height: 30px;
    margin-bottom: 16px;
}

.form-block {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.form-wrap {
    position: relative;
}

.form-block label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-navy);
    line-height: 24px;
    margin-bottom: 6px;
}

/* Inputs */
.inputs,
.textarea-inputs {
    width: 100%;
    border: 1px solid var(--border-2);
    border-radius: 4px;
    font-size: 16px;
    color: var(--brand-navy);
    font-weight: 400;
    font-family: inherit;
    padding: 10px 16px;
    background: #fff;
}

.inputs {
    height: 56px;
}

    .inputs::placeholder,
    .textarea-inputs::placeholder {
        color: #909ca9;
    }

.textarea-form-block {
    padding-bottom: 0;
    margin-bottom: 0;
}

.textarea-inputs {
    height: 200px;
    resize: none;
    padding: 14px 16px 10px;
}

/* Small helper text specifically for textareas */
p.textarea-note {
    color: var(--text-muted-2);
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
}

/* Select (appearance reset only) */
.select-inputs {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .select-inputs:focus {
        outline: none;
    }

.select-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Date inputs: hide OS chrome */
.inputs::-webkit-inner-spin-button,
.inputs::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.calendar-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

/* Content paragraphs used inside forms */
.form-wrapper p.content {
    color: var(--text-muted-2);
    font-size: 13px;
    line-height: 20px;
    margin-bottom: 16px;
}

.form-wrapper p.content-para {
    color: var(--text-muted-2);
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 20px;
}

/* Delivery (radio) */
.delivery-block {
    margin: 14px 0 26px;
    display: flex;
    align-items: center;
}

    .delivery-block p {
        color: var(--brand-navy);
        font-size: 16px;
        font-weight: 500;
        margin-right: 14px;
    }

.delivery-roles {
    display: flex;
    align-items: center;
}

.delivery-item {
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.delivery-roles label {
    color: var(--text-muted-2);
    font-size: 16px;
    font-weight: 500;
    margin-left: 8px;
    cursor: pointer;
}

.delivery-roles input[type='radio'] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-2);
    cursor: pointer;
}

    .delivery-roles input[type='radio']:checked {
        border: 4px solid var(--brand-primary);
    }

/* Checkbox (custom) */
.checkobox-area label {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
}

    .checkobox-area label input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkobox-area .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: #e1eaf3;
    border: 1px solid var(--border);
}

.checkobox-area label input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkobox-area .checkmark:after {
    content: '';
    position: absolute;
    display: none;
}

.checkobox-area label input:checked ~ .checkmark:after {
    display: block;
}

.checkobox-area label .checkmark:after {
    left: 7px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(44deg);
}

.checkobox-area p {
    color: var(--text-muted-2);
    font-size: 16px;
    line-height: 22px;
}

    .checkobox-area p strong {
        font-weight: 600;
    }

/* Indented blocks used inside forms */
.inner-checkobox {
    padding-left: 34px;
}

.global-ul {
    padding-left: 48px;
}

.inner-content-block {
    padding-left: 4px;
}

    .inner-content-block .content-para {
        margin-bottom: 5px;
    }

/* =========================================================
   Local Grid (scoped to form wrapper to avoid Bootstrap)
   ========================================================= */
.form-wrapper .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -1rem;
    margin-right: -1rem;
}

.form-wrapper .row-justify-start {
    justify-content: flex-start;
}

.form-wrapper .row-justify-center {
    justify-content: center;
}

.form-wrapper .row-justify-end {
    justify-content: flex-end;
}

.form-wrapper .row-justify-around {
    justify-content: space-around;
}

.form-wrapper .row-justify-between {
    justify-content: space-between;
}

.form-wrapper .row-align-start {
    align-items: flex-start;
}

.form-wrapper .row-align-center {
    align-items: center;
}

.form-wrapper .row-align-end {
    align-items: flex-end;
}

.form-wrapper .col-1,
.form-wrapper .col-2,
.form-wrapper .col-3,
.form-wrapper .col-4,
.form-wrapper .col-5,
.form-wrapper .col-6,
.form-wrapper .col-7,
.form-wrapper .col-8,
.form-wrapper .col-9,
.form-wrapper .col-10,
.form-wrapper .col-11,
.form-wrapper .col-12 {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    position: relative;
}

.form-wrapper .col-1 {
    width: 8.333333%;
}

.form-wrapper .col-2 {
    width: 16.666667%;
}

.form-wrapper .col-3 {
    width: 25%;
}

.form-wrapper .col-4 {
    width: 33.333333%;
}

.form-wrapper .col-5 {
    width: 41.666667%;
}

.form-wrapper .col-6 {
    width: 50%;
}

.form-wrapper .col-7 {
    width: 58.333333%;
}

.form-wrapper .col-8 {
    width: 66.666667%;
}

.form-wrapper .col-9 {
    width: 75%;
}

.form-wrapper .col-10 {
    width: 83.333333%;
}

.form-wrapper .col-11 {
    width: 91.666667%;
}

.form-wrapper .col-12 {
    width: 100%;
}

/* =========================================================
   Misc
   ========================================================= */
p.textarea-note { /* single, final definition (kept for outside .form-wrapper too) */
    color: var(--text-muted-2);
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
}
