/* --- 1. VARIABLES --- */
:root {
  --ox-primary: #d94e3b; 
  --ox-primary-dark: #c0392b;
  --ox-primary-rgb: 217, 78, 59; 
  --ox-success: #10b981;
  --ox-error: #ef4444;
  --ox-bg-overlay: rgba(0, 0, 0, 0.6);
  --ox-bg-surface: #ffffff;
  --ox-bg-subtle: #f9fafb;
  --ox-border: #e5e7eb;
  --ox-text-main: #1f2937;
  --ox-text-muted: #6b7280;
  --ox-radius: 12px;
  --ox-shadow: 0 10px 40px rgba(0,0,0,0.15);
  --ox-anim: all 0.25s ease-in-out;
}

/* --- 2. OVERLAY & MODAL --- */
.ox-overlay { 
    position: fixed; inset: 0; z-index: 2147483647; 
    background: var(--ox-bg-overlay); backdrop-filter: blur(4px); 
    display: none; align-items: center; justify-content: center; 
    opacity: 0; transition: opacity 0.2s ease;
}
.ox-overlay.active { opacity: 1; }

.ox-modal { 
    width: 100%; max-width: 950px; height: 85vh; max-height: 700px; 
    background: var(--ox-bg-surface);
    border-radius: var(--ox-radius);
    box-shadow: var(--ox-shadow);
    display: flex; flex-direction: column; overflow: hidden;
    transform: scale(0.98); transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}
.ox-overlay.active .ox-modal { transform: scale(1); }

/* --- 3. LAYOUT --- */
.ox-flex-row { display: flex; height: 100%; width: 100%; overflow: hidden; }

.ox-col-left { 
    flex: 1.4; overflow-y: auto; padding: 35px; 
    background: #fff; scroll-behavior: smooth;
}

.ox-col-right { 
    flex: 1; width: 380px; 
    background: var(--ox-bg-subtle); 
    border-left: 1px solid var(--ox-border); 
    display: flex; flex-direction: column; 
    position: relative;
}

/* --- 4. FORM ELEMENTS --- */
.ox-header-title { font-size: 24px; font-weight: 700; color: var(--ox-text-main); margin: 0 0 20px; padding-bottom: 15px; border-bottom: 2px solid #f3f4f6; }
.ox-input-group { margin-bottom: 20px; }
.ox-label { display: block; font-size: 13px; font-weight: 600; color: var(--ox-text-main); margin-bottom: 8px; }
.ox-input { 
    width: 100%; padding: 12px 16px; 
    border: 1px solid #d1d5db; border-radius: 8px; 
    font-size: 15px; color: #111; background: #fff; 
    outline: none; box-sizing: border-box; 
    transition: border 0.2s, box-shadow 0.2s; 
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.ox-input:focus { border-color: var(--ox-primary); box-shadow: 0 0 0 3px rgba(var(--ox-primary-rgb), 0.1); }
textarea.ox-input { 
    min-height: 80px; resize: vertical; white-space: normal; line-height: 1.5;
}

.ox-radio-label { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 14px 16px; margin-bottom: 12px; cursor: pointer; 
    border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; 
    transition: 0.2s; 
}
.ox-radio-label:hover { border-color: #d1d5db; background: #f9fafb; }
.ox-radio-label.selected { 
    border-color: var(--ox-primary); background: #fff; 
    box-shadow: 0 0 0 1px var(--ox-primary); 
}
.ox-radio-custom { 
    width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9ca3af; 
    margin-right: 12px; position: relative; display: inline-flex; flex-shrink: 0;
}
.ox-radio-label.selected .ox-radio-custom { border-color: var(--ox-primary); }
.ox-radio-label.selected .ox-radio-custom::after { content:''; position: absolute; inset: 3px; background: var(--ox-primary); border-radius: 50%; }
.ox-method-name { font-weight: 500; font-size: 14px; color: #374151; }
.ox-method-cost { font-weight: 700; font-size: 14px; color: #111; }

/* --- 5. CART ITEMS --- */
.ox-cart-list { flex: 1; overflow-y: auto; padding: 25px; }
.ox-cart-item { 
    display: flex; gap: 15px; margin-bottom: 18px; padding-bottom: 18px; 
    border-bottom: 1px solid #f3f4f6; align-items: center; transition: opacity 0.2s ease; 
}
.ox-item-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid #e5e7eb; background: #fff; }
.ox-item-details { flex: 1; }
.ox-item-title { font-weight: 600; font-size: 14px; line-height: 1.4; margin-bottom: 6px; color: #111; }
.ox-qty-wrapper { display: inline-flex; align-items: center; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; height: 30px; }
.ox-qty-btn { width: 30px; height: 100%; border: none; background: transparent; font-size: 16px; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.ox-qty-btn:hover:not(:disabled) { color: var(--ox-primary); background: #f9fafb; }
.ox-qty-val { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; }

/* --- 6. FOOTER --- */
.ox-footer { padding: 20px 25px; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 10px rgba(0,0,0,0.02); }
.ox-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.ox-total-label { font-size: 16px; color: #6b7280; }
.ox-total-amount { font-size: 22px; font-weight: 800; color: #111; }
.ox-btn-primary { 
    width: 100%; padding: 16px; border: none; border-radius: 8px; 
    background: var(--ox-primary); color: white; font-weight: 700; font-size: 16px; 
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; 
    transition: background 0.2s, transform 0.1s;
}
.ox-btn-primary:hover { background: var(--ox-primary-dark); }
.ox-btn-primary:active { transform: scale(0.99); }
.ox-btn-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border-radius: 50%; border: none; background: #f3f4f6; color: #9ca3af; font-size: 20px; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.ox-btn-close:hover { background: #e5e7eb; color: #111; }

.ox-add-more-cue {
    display: flex; align-items: center; justify-content: center; text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: all 0.2s;
}
.ox-add-more-cue:hover { background: #f9fafb; border-color: #9ca3af !important; }

/* --- 7. SUCCESS PAGE --- */
.ox-success-view { 
    flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; 
    padding: 40px; text-align: center; position: relative; overflow: hidden; 
}
.ox-success-view.active { display: flex; }

.ox-success-content-wrapper {
    width: 100%; display: flex; flex-direction: column; align-items: center;
    overflow-y: auto; max-height: 100%; padding: 0 10px;
}

.ox-flying-icon { 
    font-size: 60px; color: var(--ox-primary); margin-bottom: 20px; 
    animation: ox-icon-soar 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; 
    opacity: 0; transform: translateY(50px) scale(0.5); 
}
@keyframes ox-icon-soar { 
    0% { opacity: 0; transform: translateY(50px) scale(0.5) rotate(-10deg); } 
    50% { opacity: 1; transform: translateY(-10px) scale(1.1) rotate(5deg); } 
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); } 
}

@keyframes ox-receipt-card-fly-in {
    0% { opacity: 0; transform: translateY(50px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ox-receipt-card-animate {
    animation: ox-receipt-card-fly-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
    opacity: 0;
}

.ox-receipt-card { 
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 25px; 
    width: 100%; max-width: 400px; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); 
    margin-bottom: 25px; text-align: left; position: relative; 
}

.ox-receipt-details-block { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #e5e7eb; }
.ox-receipt-items-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; text-align: left; }
.ox-receipt-items-table th, .ox-receipt-items-table td { padding: 8px 0; text-align: left; border-bottom: 1px solid #f3f4f6; }
.ox-receipt-items-table th { font-weight: 700; color: #6b7280; text-transform: uppercase; font-size: 11px; border-bottom: 2px solid #e5e7eb; }
.ox-receipt-items-table th:nth-child(2), .ox-receipt-items-table td:nth-child(2) { width: 15%; text-align: center; }
.ox-receipt-items-table th:nth-child(3), .ox-receipt-items-table td:nth-child(3) { width: 25%; text-align: right; }
.ox-receipt-items-table td:first-child { max-width: 180px; width: 60%; font-weight: 600; color: #111; word-break: break-word; }
.ox-receipt-items-table tr:last-child td { border-bottom: none; }

.ox-receipt-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: #4b5563; }
.ox-receipt-row.total { border-top: 0 !important; padding-top: 0 !important; margin-top: 15px !important; font-weight: 800; font-size: 18px; color: var(--ox-text-main); }
.ox-receipt-card::before { content: ''; position: absolute; top: -5px; left: 0; right: 0; height: 5px; background: radial-gradient(circle, transparent 0.25em, #fff 0.26em) top center/0.6em 0.6em; }
.ox-order-id-badge { background: #eef2ff; color: #4f46e5; padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; display: inline-block; margin-bottom: 15px; border: 1px solid #e0e7ff; }
.ox-bangla-msg { font-size: 15px; color: #047857; background: #ecfdf5; padding: 12px 16px; border-radius: 8px; border: 1px solid #a7f3d0; margin-bottom: 20px; line-height: 1.5; max-width: 400px; text-align: center; }

/* --- 8. MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .ox-overlay { align-items: flex-end; }
    .ox-modal { width: 100%; max-width: 100%; height: 90vh; max-height: 90vh; border-radius: 16px 16px 0 0; transform: translateY(105%); }
    .ox-overlay.active .ox-modal { transform: translateY(0); }
    .ox-flex-row { flex-direction: column; display: flex; overflow-y: auto; padding-bottom: 150px; }
    .ox-col-right { order: 1; flex: none; width: 100%; background: #fff; border: none; padding: 0; padding-bottom: 50px; }
    .ox-col-left { order: 2; flex: none; width: 100%; padding: 20px 20px 0; box-sizing: border-box; }
    .ox-cart-list { padding: 10px 20px; display: block; }
    .ox-cart-list h3 { margin-top: 20px; border-top: 10px solid var(--ox-bg-subtle); padding-top: 20px; margin-bottom: 15px; }
    .ox-footer { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 100; padding: 15px 20px; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 20px rgba(0,0,0,0.05); box-sizing: border-box; }
    .ox-btn-close { top: 12px; right: 12px; }
    .ox-success-view { padding: 20px; padding-top: 60px; justify-content: flex-start; }
    .ox-success-content-wrapper { padding: 0; }
    .ox-receipt-card { max-width: 100%; margin-left: auto; margin-right: auto; }
}

.ox-skeleton { background: #e5e7eb; animation: ox-pulse 1.5s infinite; border-radius: 6px; }
@keyframes ox-pulse { 0%{opacity:0.5} 50%{opacity:1} 100%{opacity:0.5} }

@keyframes ox-pulse-animation {
  0% { box-shadow: 0 0 0 0 rgba(var(--ox-primary-rgb), 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(var(--ox-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--ox-primary-rgb), 0); }
}
.ox-btn-animated:not(:hover):not(:disabled) { animation: ox-pulse-animation 2s infinite; }
.ox-btn-animated:hover, .ox-btn-animated:focus { animation: none; box-shadow: none; }
.ox-btn-animated:disabled { animation: none; box-shadow: none; }

/* --- 10. PREMIUM NOTIFICATION (TOAST) --- */
.ox-toast {
    position: absolute;
    top: 20px; 
    left: 50%;
    transform: translateX(-50%) translateY(-100px); /* Start hidden above */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border: 1px solid #e5e7eb;
    border-left: 4px solid #333; /* Default border */
    border-radius: 8px;
    padding: 12px 20px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.ox-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ox-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ox-toast-msg {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

/* Variant: Error */
.ox-toast.ox-toast-error { border-left-color: var(--ox-error); }
.ox-toast.ox-toast-error .ox-toast-icon { color: var(--ox-error); }

/* Variant: Success */
.ox-toast.ox-toast-success { border-left-color: var(--ox-success); }
.ox-toast.ox-toast-success .ox-toast-icon { color: var(--ox-success); }