/* GIROO V23.5.7 - CENTRAL MODAL DO PEDIDO */

.g-order-central-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.g-order-central-modal.is-open {
    display: flex;
}

.g-order-central-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 21, 25, .52);
    backdrop-filter: blur(4px);
}

.g-order-central-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8de;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(17, 24, 20, .28);
}

.g-order-central-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px;
    border-bottom: 1px solid #edf1ea;
    background:
        linear-gradient(
            180deg,
            rgba(184,255,57,.10),
            rgba(184,255,57,0)
        ),
        #fff;
}

.g-order-central-kicker {
    display: block;
    color: #779127;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
}

.g-order-central-title-row {
    margin-top: 3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.g-order-central-title-row h3 {
    margin: 0;
    color: #17222c;
    font-size: 20px;
}

.g-order-central-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef3e8;
    color: #66715f;
    font-size: 9px;
    font-weight: 900;
}

.g-order-central-status[data-status="novo"] {
    background: #fff4d8;
    color: #9a6d00;
}

.g-order-central-status[data-status="preparo"] {
    background: #fff0dc;
    color: #a15d12;
}

.g-order-central-status[data-status="pronto"] {
    background: #e9f9e9;
    color: #28733a;
}

.g-order-central-status[data-status="rota"] {
    background: #e8f2ff;
    color: #2864a4;
}

.g-order-central-status[data-status="cancelado"] {
    background: #ffe9e9;
    color: #a23535;
}

.g-order-central-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe5da;
    border-radius: 11px;
    background: #fff;
    color: #57635d;
    font-size: 22px;
    cursor: pointer;
}

.g-order-central-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f7f9f5;
}

.g-order-central-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.g-order-central-summary > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e5eae1;
    border-radius: 13px;
    background: #fff;
}

.g-order-central-summary span,
.g-order-central-note > span,
.g-order-section-title > span {
    display: block;
    color: #849083;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
}

.g-order-central-summary strong {
    display: block;
    margin-top: 3px;
    color: #222f37;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.g-order-central-summary small {
    display: block;
    margin-top: 3px;
    color: #7d8781;
    font-size: 9px;
}

.g-order-central-items {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e4e9df;
    border-radius: 15px;
    background: #fff;
}

.g-order-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.g-order-section-title strong {
    color: #69756e;
    font-size: 9px;
}

.g-order-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f2ed;
}

.g-order-item:first-of-type {
    border-top: 0;
}

.g-order-item-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.g-order-item-qty {
    min-width: 25px;
    color: #6f812d;
    font-size: 10px;
    font-weight: 900;
}

.g-order-item-main strong {
    display: block;
    color: #243039;
    font-size: 10px;
}

.g-order-item-main small,
.g-order-item-extras {
    display: block;
    margin-top: 3px;
    color: #7e8982;
    font-size: 8px;
}

.g-order-item-extras {
    color: #64765b;
}

.g-order-item-total {
    white-space: nowrap;
    color: #243039;
    font-size: 10px;
}

.g-order-central-note {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #ffe5bd;
    border-radius: 14px;
    background: #fff9ef;
}

.g-order-central-note p {
    margin: 5px 0 0;
    color: #5a5045;
    font-size: 10px;
    line-height: 1.45;
}

.g-order-central-total {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #18231f;
    color: #fff;
}

.g-order-central-total span {
    font-size: 9px;
    font-weight: 800;
}

.g-order-central-total strong {
    font-size: 17px;
}

.g-order-central-actions {
    position: sticky;
    bottom: -16px;
    margin: 14px -16px -16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #e4e9df;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}

.g-order-action {
    min-height: 36px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce3d7;
    border-radius: 10px;
    background: #fff;
    color: #344039;
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.g-order-action.edit {
    border-color: #b8ff39;
    background: #b8ff39;
    color: #192015;
}

.g-order-action.print {
    background: #f2f5ef;
}

.g-order-action.danger {
    margin-left: auto;
    border-color: #ffc9c9;
    background: #fff4f4;
    color: #a73939;
}

.g-order-action.delete {
    border-color: #ecb5b5;
    background: #fff;
    color: #9c3030;
}

.g-order-central-loading,
.g-order-central-error,
.g-order-empty {
    padding: 30px 18px;
    text-align: center;
    color: #758079;
    font-size: 10px;
}

.g-order-central-error strong,
.g-order-central-error span {
    display: block;
}

.g-order-central-error span {
    margin-top: 5px;
}

body.g-order-modal-open {
    overflow: hidden;
}

.order-card[data-detail-url] {
    cursor: pointer;
}

@media (max-width: 680px) {
    .g-order-central-modal {
        padding: 8px;
        align-items: flex-end;
    }

    .g-order-central-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 10px 10px;
    }

    .g-order-central-summary {
        grid-template-columns: 1fr;
    }

    .g-order-central-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .g-order-action.danger {
        margin-left: 0;
    }
}

/* GIROO V23.5.7.1 - CORRECAO LAYOUT DOS ITENS DO MODAL */

.g-order-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start !important;
    gap: 16px !important;
}

.g-order-item-main {
    min-width: 0 !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start !important;
    gap: 8px !important;
}

.g-order-item-main > div {
    min-width: 0 !important;
    width: 100%;
}

.g-order-item-qty {
    min-width: 30px !important;
    width: 30px;
    flex: 0 0 30px;
    white-space: nowrap;
    color: #7f9f14;
    font-size: 11px !important;
    font-weight: 900;
}

.g-order-item-main strong {
    display: block !important;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    color: #243039;
    font-size: 10px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

.g-order-item-main small,
.g-order-item-extras {
    display: block !important;
    width: 100%;
    margin-top: 4px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.g-order-item-total {
    min-width: max-content;
    margin: 0 !important;
    padding-top: 1px;
    white-space: nowrap !important;
    text-align: right;
    color: #243039;
    font-size: 11px !important;
    font-weight: 900;
}

/* Pizza: permite que composicoes longas ocupem a largura disponivel */
.g-order-central-items {
    overflow: hidden;
}

.g-order-central-items .g-order-item {
    width: 100%;
}

@media (max-width: 560px) {
    .g-order-item {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    .g-order-item-total {
        padding-left: 38px;
        text-align: left;
    }
}

/* GIROO V23.5.7.2 - REPARO DEFINITIVO LARGURA DOS ITENS */

.g-order-central-items,
.g-order-central-items * {
    box-sizing: border-box;
}

.g-order-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
}

.g-order-item-main {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 8px !important;
}

.g-order-item-main > div {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

.g-order-item-qty {
    display: block !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.g-order-item-main strong {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    hyphens: manual !important;
    line-height: 1.45 !important;
}

.g-order-item-main small,
.g-order-item-extras {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
}

.g-order-item-total {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    margin-left: auto !important;
    white-space: nowrap !important;
    text-align: right !important;
}

@media (max-width: 560px) {
    .g-order-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 7px !important;
    }

    .g-order-item-total {
        margin-left: 38px !important;
        text-align: left !important;
    }
}

/* GIROO V23.5.8.1 - CENTRAL DO PEDIDO 2.0 */

.g-order-flow-card {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e4e9df;
    border-radius: 15px;
    background: #fff;
}

.g-order-flow {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 14px;
}

.g-order-flow::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: #e6ebe2;
}

.g-order-flow-step {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.g-order-flow-dot {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #d9dfd5;
    box-shadow: 0 0 0 1px #d9dfd5;
}

.g-order-flow-step.is-done .g-order-flow-dot {
    background: #b8ff39;
    box-shadow: 0 0 0 1px #98d526;
}

.g-order-flow-step.is-active .g-order-flow-dot {
    box-shadow:
        0 0 0 1px #7ba91d,
        0 0 0 5px rgba(184,255,57,.20);
}

.g-order-flow-step small {
    color: #7c8881;
    font-size: 8px;
    font-weight: 800;
    line-height: 1.25;
}

.g-order-flow-step.is-done small {
    color: #485641;
}

.g-order-flow.is-cancelled {
    opacity: .55;
}

.g-order-quick-action {
    min-height: 38px;
    padding: 0 15px;
    border: 0;
    border-radius: 10px;
    background: #b8ff39;
    color: #17210f;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}
