/*
  DriftTemplate
  - Styling helpers to match the React "Modern Light" layout
  - Keeps Bootstrap for existing cart/order scripts, while Drift UI uses Tailwind
*/

:root {
  --drift-emerald: #10b981;
}

* { box-sizing: border-box; }

body.drift-body {
  margin: 0;
  font-family: "Cairo", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: #f9fafb;
  color: #111827;
}

/* Safe area */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* Scrollbars */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Bootstrap modal shaping to look like the React bottom-sheet */
#productModal .modal-dialog {
  max-width: 420px;
}

@media (max-width: 640px) {
  #productModal .modal-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    max-width: none;
    width: 100%;
  }
}

#productModal .drift-modal-content {
  border: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  #productModal .drift-modal-content {
    border-radius: 1.5rem 1.5rem 0 0;
  }
}

#productModal .drift-modal-footer {
  border-top: 1px solid #f3f4f6;
  padding: 16px;
}

/* Variant buttons (generated by order.js as bootstrap buttons) */
#variants-area .btn {
  border-radius: 0.75rem;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  border-color: #e5e7eb;
  color: #374151;
}

#variants-area .btn-outline-primary.active,
#variants-area .btn-outline-primary:active,
#variants-area .btn-outline-primary:focus {
  background: #ecfdf5;
  border-color: var(--drift-emerald);
  color: #065f46;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

/* Extras checkbox rows (generated by order.js) */
#exrtas-area-inside .container_check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  position: relative;
  margin-bottom: 10px;
}

#exrtas-area-inside .container_check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#exrtas-area-inside .container_check .checkmark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#exrtas-area-inside .container_check input:checked ~ .checkmark {
  background: var(--drift-emerald);
  border-color: var(--drift-emerald);
}

#exrtas-area-inside .container_check input:checked ~ .checkmark:after {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/* Drift – Cart Summary (Luxe-ish styling, scoped to the cart modal)           */
/* -------------------------------------------------------------------------- */

.drift-cart-modal .modal-dialog.drift-cart-dialog{
  max-width: 420px;
}

@media (max-width: 576px){
  .drift-cart-modal .modal-dialog.drift-cart-dialog{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
  }
  .drift-cart-modal .modal-dialog.drift-cart-dialog .modal-content{
    width: 100%;
    border-radius: 24px 24px 0 0;
    pointer-events: auto;
  }
}

.drift-lux-cart{
  border-radius: 24px;
}

.drift-lux-cart .box-info{
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.drift-lux-cart .box-order .head{
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 12px;
}

.drift-lux-cart .box-order .head h6{
  margin: 0;
  font-weight: 700;
  color: #111827;
  font-size: 16px;
  line-height: 1.3;
}

.drift-lux-cart .content{
  max-height: 45vh;
  overflow: auto;
  padding-right: 2px;
}

.drift-lux-cart .empty-cart{
  padding: 12px 0;
  text-align: center;
  color: #6b7280;
}

.drift-lux-cart ul{ list-style: none; padding: 0; margin: 0; }

.drift-lux-cart .items{
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.drift-lux-cart .product-item_title{
  color: #111827;
  font-weight: 700;
  font-size: 13px;
  display: block;
  max-width: 240px;
  text-decoration: none;
}

.drift-lux-cart .product-item_quantity{
  color: #6b7280;
  font-weight: 700;
}

.drift-lux-cart .product-item_price{
  color: #059669;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.drift-lux-cart .btn-cart-radius{
  border-radius: 999px;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

.drift-lux-cart .btn-cart-radius:hover{
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.25);
}

.drift-lux-cart .actionsCart{
  margin-top: 12px;
}

.drift-lux-cart .button{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 10px 24px rgba(16,185,129,0.25);
}

.drift-lux-cart .button:hover{
  filter: brightness(0.98);
}

.drift-lux-cart .button .ammount{
  font-weight: 900;
  white-space: nowrap;
}
