﻿
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --brand-primary: #1a434e;
    --brand-secondary: #1a434e;
    --brand-tertiary: #f5c4a2;
    --app-primary: #424242;
    --app-secondary: #ef8321ba;
    --app-tertiary: #ed9d36;
    --app-primary-hover: #575757;
    --app-secondary-hover: #ef8321;
    --st-border: #f5c4a2;
}

/*    --brand-primary: #424242;
    --brand-secondary: #f5c4a2;
    --brand-tertiary: #f5c4a2;*/

html, body {
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: 0.2px;
    width: 100% !important;
}

/* Blazor's <FocusOnNavigate Selector="h1" /> (App.razor) focuses the page
   heading after every navigation for screen readers; suppress the resulting
   default browser focus outline since no visible ring is designed for it. */
h1:focus {
    outline: none;
}

.cmb-10 {
    margin-bottom: 10px;
}

.table {
    color: #636363 !important;
}

.login h2 {
    margin-bottom: 30px;
    padding: 10px;
    color: #636363;
    font-size: 22px;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-item a.active {
    background-color: #f8f8f8 !important;
    color: var(--brand-primary) !important;
}

.loader-wrapper {
    padding: 50% 0;
    text-align: center;
}

.validation-message {
    color: red;
}

/* -------------------------------------------------- */
/* LOGIN PAGE */
/* -------------------------------------------------- */

.login-page-div {
    display: flex;
    width: 100%;
    justify-content: center;
    height: 100vh;
    align-items: center;
}

.login-page-details {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 6px;
    border: 1px solid lightgray;
    background-color: white;
    max-height: 800px;
    width: 350px;
    padding: 45px;
    gap: 45px;
    justify-content: space-around;
    user-select: none;
    text-align: center;
}

.login-page-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form {
    display: grid;
    gap: 45px;
}

.login-customer-logo {
    max-width: 240px;
}
.st-pbtn {
    padding: 0.7rem 1.2rem;
    display: flex;
    gap: 10px;
    /*background-color: var(--brand-secondary);*/
    background-color: #575757;
    color: white;
    font-size: 1.2rem;
    height: 50px !important;
    width: fit-content;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
}

    .st-pbtn:hover {
        box-shadow: 0 2px 6px #575757;
    }
#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;
    }

.splash-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column nowrap;
    height: 100vh;
    font-family: "Segoe UI",Roboto,"Helvetica Neue","-apple-system",BlinkMacSystemFont,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
    font-size: .88rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

    .splash-screen .spinner-border {
        border: .2em solid;
        border-color: var(--brand-primary) #bfbfbf #bfbfbf;
        border-radius: 60px;
        width: 120px;
        height: 120px;
    }

.splash-screen-caption {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.splash-screen-text {
    color: #a1a1a1;
    margin-top: .5rem;
}

.cw-320 {
    max-width: 450px;
}

.blazored-typeahead {
    width: 320px;
    max-width: 450px;
}
.card-h4 {
    background-color: #efefef;
    padding: 9px;
    max-width: 590px;
    border-radius: 2px;
    border: 1px solid #efefef;
    margin-bottom: 15px;
    margin-top: 31px;
}

@media (min-width: 641px) {
    .main-col h4, h4span {
        margin-top: 0px;
    }
    .card-h4 {
        max-width: 75%;
    }
}
@media (min-width: 800px) {
    .main-col h4, h4span {
        margin-top: 0px;
    }

    .card-h4 {
        max-width: 800px;
    }
}
@media (max-width: 640.98px) {
    .top-row:not(.auth)[b-6izfpeqxma] {
        display: flex !important;
    }

    .cw-320 {
        max-width: 700px;
    }
    .blazored-typeahead {
        max-width: 700px;
    }
    .card-h4 {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 20px;
    }

    .cw-320 {
        max-width: 700px;
    }
    .blazored-typeahead {
        max-width: 700px;
    }
    .card-h4 {
        max-width: 100%;
    }
}
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-dialog-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px black;
    width: 32%;
}

.custom-dialog-footer {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* ================================================== */
                    /* Login Page */
/* ================================================== */

.login-page-div {
    display: flex;
    width: 100%;
    justify-content: center;
    height: 100vh;
    align-items: center;
}

.login-page-details {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 6px;
    border: 1px solid lightgray;
    background-color: white;
    max-height: 800px;
    width: 350px;
    padding: 45px;
    gap: 70px;
    justify-content: space-around;
    user-select: none;
    text-align: center;
}

.login-page-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form {
    display: grid;
    gap: 45px;
}

.login-customer-logo {
    max-width: 240px;
}

.st-pbtn {
    padding: 0.7rem 1.2rem;
    display: flex;
    gap: 10px;
    background-color: var(--app-primary-hover);
    color: white;
    font-size: 1.2rem;
    height: 50px !important;
    width: fit-content;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
}

    .st-pbtn:hover {
        box-shadow: 0 2px 6px var(--app-primary-hover);
    }

.st-plbl {
    color: #575757ad;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

/*         progress bar */

.progress-bar-wrapper {
    width: 100%;
    font-family: Arial, sans-serif;
    user-select: none;
}

.progress-bar-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-static-text {
    display: block;
    /* text-align: center; */
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 4px;
    user-select: none;
}

.progress-bar {
    position: relative;
    height: 10px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.progress-bar-text-div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.progress-bar-header {
    font-size: 1.2rem;
}

.progress-bar-text {
    font-size: 1.1rem;
    font-weight: 600;

}

.progress-bar-sub-text {
    font-size: 1rem;

}

.progress-bar-fill {
    height: 100%;
    width: 0;
    background: var(--brand-secondary);
    border-radius: 4px 0 0 4px;
    transition: width 0.5s ease;
    user-select: none;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 1rem;
    color: white;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 3px rgba(0,0,0,0.6); /* improve readability */
}


/*Comments*/

.user-message {
    width: 100%;
    display: flex;
    justify-content: space-between;
    /* margin-bottom: 10px; */
    align-items: baseline;
    line-break: anywhere;
}

.recipient-message {
    width: 100%;
    display: flex;
    justify-content: right;
    /* margin-bottom: 10px; */
    align-items: baseline;
    line-break: anywhere;
}

/*Timer*/
.circular-progress {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    margin-bottom: 30px;
    justify-content: center;
    margin-top: 10px;
}

.progress-ring {
    transform: rotate(0deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
    stroke-linecap: round;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.time-separator {
    font-size: 18px;
    color: #999;
    margin: 2px 0;
}

.expected-time {
    color: #666;
    font-size: 18px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-start {
    background-color: #28a745;
    color: white;
}

    .btn-start:hover:not(:disabled) {
        background-color: #45a049;
    }

.btn-stop {
    background-color: #dc3545;
    color: white;
}

    .btn-stop:hover:not(:disabled) {
        background-color: #dc3545;
    }

/* ================================================== */
/* ST Text area */
/* ================================================== */

.st-text-area {
    position: relative;
    display: inline-block;
    width: 100%;
    font-family: inherit;
    height: 50px;
}

    .st-text-area input {
        width: 100%;
        padding: 12px 8px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 6px;
        outline: none;
        background: white;
        transition: border-color 0.2s ease;
        padding-left: 15px;
    }

        .st-text-area input:focus {
            border-color: var(--brand-secondary); /* Accent color */
        }

    /* TextArea styles - matching input styles */
    .st-text-area textarea {
        width: 100%;
        padding: 12px 8px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 6px;
        outline: none;
        background: white;
        transition: border-color 0.2s ease;
        padding-left: 15px;
        padding-top: 15px;
        font-family: inherit;
        resize: vertical; /* Allows vertical resize only */
        min-height: 100px;
    }

        .st-text-area textarea:focus {
            border-color: var(--brand-secondary);
        }

    .st-text-area label {
        position: absolute;
        top: 20%;
        left: 15px;
        transform: translateY(-50%);
        background: transparent;
        padding: 0 4px;
        color: #888;
        font-size: 16px;
        pointer-events: none;
        transition: all 0.2s ease;
        border-radius: 4px;
    }

    /* Float label when input has focus or value */
    .st-text-area input:focus + label,
    .st-text-area input:not(:placeholder-shown) + label {
        top: 0px;
        left: 15px;
        font-size: 12px;
        color: var(--brand-secondary);
        background: white;
        /*border: 1px solid var(--brand-secondary);*/
    }

    /* Float label when textarea has focus or value */
    .st-text-area textarea:focus + label,
    .st-text-area textarea:not(:placeholder-shown) + label {
        top: 0px;
        left: 15px;
        font-size: 12px;
        color: var(--brand-secondary);
        background: white;
    }

    /* Validation error states for input */
    .st-text-area input.validation-error:focus + label,
    .st-text-area input.validation-error:not(:placeholder-shown) + label {
        color: #dc3545;
    }

    /* Validation error states for textarea */
    .st-text-area textarea.validation-error:focus + label,
    .st-text-area textarea.validation-error:not(:placeholder-shown) + label {
        color: #dc3545;
    }

    .st-text-area.validation-error .st-text-area label {
        color: #dc3545;
    }

.validation-error {
    border-color: #dc3545 !important;
    background-color: #fff3f3 !important;
}

.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    margin-left: 15px;
    display: flex;
    gap: 10px;
    position: absolute;
    top: -32px;
    right: 8px;
    align-items: baseline;
    padding: 5px;
}

/* Adjust floating-input height for textarea containers */
.st-text-area:has(textarea) {
    height: auto;
    min-height: 100px;
}



/* ================================================== */
/* Floating Label Input */
/* ================================================== */

.floating-input {
    position: relative;
    display: inline-block;
    width: 100%;
    font-family: inherit;
    height: 50px;
}

    .floating-input input {
        width: 100%;
        padding: 12px 8px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 6px;
        outline: none;
        background: white;
        transition: border-color 0.2s ease;
        padding-left: 15px;
    }

        .floating-input input:focus {
            border-color: var(--brand-secondary); /* Accent color */
        }

    .floating-input label {
        position: absolute;
        top: 50%;
        left: 15px;
        transform: translateY(-50%);
        background: transparent;
        padding: 0 4px;
        color: #888;
        font-size: 16px;
        pointer-events: none;
        transition: all 0.2s ease;
        border-radius: 4px;
    }

    /* Float label when input has focus or value */
    .floating-input input:focus + label,
    .floating-input input:not(:placeholder-shown) + label {
        top: 0px;
        left: 15px;
        font-size: 12px;
        color: var(--brand-secondary);
        background: white;
        /*border: 1px solid var(--brand-secondary);*/
    }

    .floating-input input.validation-error:focus + label,
    .floating-input input.validation-error:not(:placeholder-shown) + label {
        color: #dc3545;
    }

    .floating-input.validation-error .floating-input label {
        color: #dc3545;
    }

.validation-error {
    border-color: #dc3545 !important;
    background-color: #fff3f3 !important;
}

.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    margin-left: 15px;
    display: flex;
    gap: 10px;
    position: absolute;
    top: -32px;
    /* left: 0px; */
    right: 8px;
    align-items: baseline;
    padding: 5px;
}

/* -------------------------------------------------- */
/* Login page (Login.razor) — global because these rules need to target
   <body>, which Blazor never applies a scope attribute to. Scoped with
   :has(.page-wrapper) so they only take effect while Login.razor is
   actually mounted (i.e. on the login route). */

body:has(.page-wrapper.ready) {
    background: #575757;
}

@media (max-width: 800px) {
    body:has(.page-wrapper) {
        background: white;
    }
}

/* BlazoredToasts (MainLayout.razor) renders its container outside any scoped
   component's markup, so this can't live in a component-scoped .razor.css. */
@media (max-width: 768px) {
    .blazored-toast-container {
        margin-top: 50px;
    }
}

/* -------------------------------------------------- */
/* Quantity stepper (+/- number input UI), used by ProductionQty.razor —
   promoted here so it's a single shared definition. */

.quantity-control-production {
    display: flex;
    align-items: center;
    border: 2px solid var(--brand-secondary);
    border-radius: 4px;
    background-color: var(--brand-secondary);
    justify-content: space-evenly;
    font-size: 17px;
}

    .quantity-control-production button {
        border: none;
        background: none;
        padding: 8px 12px;
        cursor: pointer;
        color: white;
        font-size: 17px;
    }

    .quantity-control-production input {
        border: none;
        text-align: center;
        font-size: 17px;
        background-color: var(--brand-secondary);
        color: white;
        height: 35px;
    }

    .quantity-control-production button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

    .quantity-control-production input:disabled {
        opacity: 0.6;
    }
