#order-app { font-family: sans-serif; }
#order-app {
    position: fixed;      /* VERY IMPORTANT */
    inset: 0;             /* top:0 right:0 bottom:0 left:0 */
    overflow: hidden;
    background: #fff;
    z-index: 9999;        /* above theme */
}

.mwt-header{
  display: flex;
  text-align: center;
  background-color: rgb(201, 56, 56);
  color: white;
  font-size: 32px;
  padding: 12px;
}
.mwt-tabs { display: flex; margin-bottom: 10px; text-align: center; }
.mwt-tabs span{
  display: block;
  width: 100%;
  font-size: 24px;
}
.mwt-tabs span.dashicons{
  margin-bottom: 20px;
  font-size: 32px;
}
.mwt-tabs .mwt-tab { flex: 1; padding: 8px; cursor: pointer; background: #2d9982; color: #fff; border: none; }
.mwt-tabs .mwt-tab.active { background: #215348; }
.order-item { padding: 5px; border-bottom: 1px solid #ccc; }
.no-records { text-align: center; padding: 30px; color: #888; }
.loading { text-align: center; padding: 20px; color: #555; }
#order-log { margin-top: 10px; font-size: 12px; color: #555; position: fixed; bottom: 0; padding: 16px;}
.admin-bar #order-app{
  top: 46px;
}
/* #order-app{
  position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -10px;
    background-color: white;
    z-index: 100;
} */

/* CSS */
.mwt-order-card {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    background-color: #f8f8f8;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 10px 0;
    font-family: Arial, sans-serif;
    cursor: pointer;
}
.mwt-order-card:hover {
    background: #f5f5f5;
}

.mwt-order-status {
    font-size: 40px; /* size of check mark */
    color: #28a745;  /* green */
    margin-right: 15px;
    display: flex;
    flex-direction: column;
}
.mwt-order-status.dashicons-clock{
    color: #c0392b;
}
.mwt-order-info {
   /*  display: flex;
    flex-direction: column; */
    margin-left: 60px;
    flex-grow: 1;
}

.mwt-order-number { 
    font-size: 24px;
    margin-bottom: 5px;
}
.mwt-order-number span{
  font-weight: bold;
}
.mwt-order-time {
    color: #c0392b; /* reddish color for timestamp */
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-left: 40px;
}

.mwt-order-time .dashicons {
    font-size: 16px;
    margin-right: 5px;
    color: #f1c40f; /* goldish for clock */
}

.mwt-order-detail{
    flex-grow: 2;
}
.mwt-od-dtype{
    text-transform: uppercase;
}
.hidden { display: none; }

.order-detail-header {
    background: #c62828;
    color: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-items .order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.order-summary {
    margin-top: 10px;
}

.order-summary .total {
    font-weight: bold;
    font-size: 18px;
}

.order-actions {
    display: flex;
    position: sticky;
    bottom: 0;
    width: 100%;
}

.order-actions button {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: none;
    cursor: pointer;

}

.accept { background: green; color: #fff; }
.reject { background: red; color: #fff; }

#app-header {
    height: 80px;
    background: rgb(201, 56, 56);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    font-size: 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}

#header-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}
/* Common view styles */
.view {
    position: absolute;   /* MUST be absolute */
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    background: #fff;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}
#order-detail-view.view{
  height: calc(100% - 80px);
}
/* Initial positions */
#order-list-view {
    transform: translateX(0%);
    z-index: 1;
}

#order-detail-view {
    transform: translateX(100%);
    z-index: 2;
    overflow-y: auto;
}

/* ACTIVE STATES (FULL SLIDE) */
#order-list-view.slide-left {
    transform: translateX(-100%);
}

#order-detail-view.slide-in {
    transform: translateX(0%);
}
#order-list{
  height: calc(100% - 285px);
  overflow: hidden;
  overflow-y: auto;
}
@media (min-width: 768px) {
    #order-app {
        max-width: none;
        margin: 0;
    }
}


/* OVERLAY */
#accept-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}

/* MODAL */
#accept-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* ACTIVE STATE */
#accept-modal.show {
    transform: translateY(0);
}

/* HEADER */
.modal-header {
    background: #c62828;
    color: #fff;
    text-align: center;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
}

/* BODY */
.modal-body {
    overflow-y: auto;
    flex: 1;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

/* FOOTER */
.modal-footer {
    display: flex;
    height: 50px;
}

.modal-footer button {
    flex: 1;
    border: none;
    font-size: 16px;
    color: #fff;
}

.confirm {
    background: #2e7d32;
}

.cancel {
    background: #c62828;
}

/* HIDE */
.hidden {
    display: none;
}


/** Bottom Line **/
.bottom-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* LEFT */
.bottom-list-left {
    flex: 1;
    font-size: 14px;
}

/* RIGHT */
.bottom-list-right {
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .bottom-list {
        display: flex !important;
        flex-direction: row !important;
    }
}



.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.2s ease;
    z-index: 9999;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.modal-popup {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;

    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-popup {
    transform: scale(1);
}

.modal-popup {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    animation: popupScale 0.2s ease;
}

@keyframes popupScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 14px;
    text-align: center;
    font-weight: 600;
    color: #fff;
}

.modal-header.red {
    background: #e53935;
}

.modal-body {
    padding: 12px;
}

.radio-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.radio-row input {
    margin-right: 10px;
}

.modal-footer {
    display: flex;
}

.modal-footer button {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    border: none;
    cursor: pointer;
}

.btn-confirm {
    background: #009688;
    color: #fff;
}

.btn-cancel {
    background: #e53935;
    color: #fff;
}