/* ===================================================== Tuỳ Chỉnh Chung =====================================================================================  */

/* ===== Font chung ===== */
.idl-checkout-container,
.idl-empty-cart-global {
  font-family: "Geist", sans-serif;
}

/* ===== Border và Background chung cho các box ===== */
.idl-order-summary,
.idl-contact-information,
.idl-shipping-address,
.idl-billing-address,
.idl-payment-method {
    background: #F5F5F5;
    border: 2px solid #BEBEBE;
    border-radius: 12px;
    padding: 1rem;
}
/* ===== Font-size và Font-weight cho các Header trong box ===== */
.idl-order-summary h3,
.idl-contact-information h3,
.idl-shipping-address h3,
.idl-billing-address h3,
.idl-payment-method h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1rem;
}
/* ===== Label & Item Name ===== */
.idl-order-title,
.idl-order-price,
.idl-form-group label,
.idl-same-billing-label{
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
}

/* ===== Input & Select Fields ===== */
.idl-checkout-container input,
.idl-checkout-container select,
.idl-checkout-container textarea {
  background: #FFFFFF;        
  border: 0.5px solid #BEBEBE;     
  border-radius: 6px;             
  padding: 0.5rem 0.75rem;        
  font-size: 0.875rem;            
  color: #000000;                 
  outline: none;                  
  width: 100%;                    
  box-sizing: border-box;         
}
.idl-checkout-container input:focus,
.idl-checkout-container select:focus,
.idl-checkout-container textarea:focus {
  border-color: #BEBEBE;         
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* ===== Shipping & Billing Address Box Gap ===== */
.idl-shipping-address,
.idl-billing-address {
  gap: 0.3rem;
}

#idl-billing-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ===== Hover + Active For Payment Options ===== */
.idl-payment-option:hover,
.idl-payment-option.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.idl-payment-option:hover .idl-payment-icon,
.idl-payment-option.active .idl-payment-icon {
  filter: brightness(0) invert(1);
}

.idl-paypal-option:hover,
.idl-paypal-option.active {
  background: #000;
  border-color: #000;
}

.idl-paypal-option:hover .idl-paypal-title,
.idl-paypal-option.active .idl-paypal-title {
  color: #fff; 
}

.idl-paypal-option:hover .idl-paypal-sub,
.idl-paypal-option.active .idl-paypal-sub {
  color: #fff; 
}

/* ==================================================================================================================================================================  */

/* ===== Fallback global ===== */
.idl-empty-cart-global {
  display: flex;
  justify-content: center;
  height: 50vh;
  text-align: center;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
}

/* ===== Wrapper ===== */
.idl-checkout-container {
  max-width: 100%;
  display: flex;
  flex-direction: column
}

/* ===== Checkout Heading ===== */
.idl-checkout-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 2.25rem;
  color: #000000;
  margin-bottom: 0;
}

/* ===== Checkout Sub-heading ===== */
.idl-checkout-header p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  color: #484848;
  margin-top: 0.5rem;
}

/* ===== Order Summary + Checkout Information Container Direction ===== */
.idl-order-checkout{
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* ===== Order Summary Box ===== */
.idl-order-summary{
    display: flex;
    flex-direction: column;
    width: 30%;
}

/* ===== Order Item Container ===== */
.idl-order-item-wrapper{
    display: flex;
    justify-content: space-between;
}

.idl-order-item{
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* ===== Order Info Wrapper ===== */
.idl-order-info-wrapper{
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== Order Item Thumbnail ===== */
.idl-order-thumb{
    width: 5rem !important;
    height: 5rem !important;
    border-radius: 6px !important;
}
/* ===== Order Info Container ===== */
.idl-order-info{
    display: flex;
    flex-direction: column;
}

/* ===== Order Item Name One Line ===== */
.idl-order-title{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
    width: 90%;
}

/* ===== Order Item Meta Wrapper ===== */
.idl-order-meta{
    display: flex;
    margin-bottom: 0.5rem;
    gap: 0.7rem;
}

/* ===== Order Item Meta ===== */
.idl-order-meta .idl-pill{
    border: 2px solid #BEBEBE;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
}

/* ===== Order Item Quantity Control Container ===== */
.idl-qty-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== Order Item Quantity Button ===== */
.idl-qty-control button {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #BEBEBE;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

/* ===== Order Item Quantity Display ===== */
.idl-qty-control span.idl-qty {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem; 
}

/* ===== Remove Button ===== */
.idl-qty-control button.idl-remove {
  cursor: pointer;
  border: none;
  background: transparent;
}

/* ===== Icon Remove Button ===== */
.idl-qty-control .idl-trash-icon {
  width: 1.25rem;
  height: 1.25rem;
  max-width: 1.25rem !important;
  display: block;
}

/* ===== Order Total Container ===== */
.idl-order-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 2px solid #BEBEBE;
}

/* ===== Order Total Div ===== */
.idl-order-totals div {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

/* ===== Grand Total ===== */
.idl-grand-total {
  display: grid;
  grid-template-columns: 1fr auto;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 2px solid #BEBEBE;
}

/* ===== Grand Total Text ===== */
.idl-grand-total strong {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
}

/* ===== Checkout Form Wrapper ===== */
.idl-checkout-form-wrapper{
  display: flex;
  flex-direction: column;
  width: 70%;
  gap: 1rem;
}

/* ===== Label & Field Direction ===== */
.idl-form-group{
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ===== Field Group Direction Grid ===== */
.idl-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== Field Group Direction Flex ===== */
.idl-flex-2 {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

/* ===== Shipping Address Container ===== */
.idl-shipping-address {
  display: flex;
  flex-direction: column;
}

/* ===== State & City Group ===== */
.idl-form-city-state{
  display: flex;
  gap: 1rem;
  width: 70%
}

/* ===== Zip Container ===== */
.idl-zip-container{
  width: 40%;
}

/* ===== State & City Input Field Width ===== */
.idl-input-state{
  width: 90% !important;
} 

.idl-input-city{
  width: 100% !important;
} 

/* ===== State Font Style ===== */
.idl-checkout-container select option,
.idl-input-state{
  font-family: "Geist", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: #484848;
}

/* ===== Checkbox Container Direction ===== */
.idl-same-billing{
  display: flex;
  gap: 0.5rem;
}

/* ===== Checkbox Size & Customize ===== */
#idl-same-billing {
  display: none;
}

.idl-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.idl-checkbox-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* ===== Billing Address Form Container ===== */
.idl-billing-form{
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}


/* ===== Payment Method Container ===== */
.idl-payment-method {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== Payment Options Container ===== */
.idl-payment-method-button{
  display: flex;
  gap: 1rem;
}

/* ===== Payment Buttons ===== */
.idl-payment-method-button {
  display: flex;
  gap: 1rem;
}

.idl-payment-option {
  flex: 1;
  border: 2px solid #BEBEBE;
  border-radius: 6px;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Geist", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #484848;
  background: #fff;
  transition: all 0.2s ease;
}

.idl-payment-option .idl-payment-icon {
  width: 24px;
  height: 24px;
}

/* ===== PayPal Button ===== */
.idl-paypal-button-container {
  width: 100%;
}

.idl-paypal-option {
  width: 100%;
  color: #fff;
  border-radius: 6px;
  border: 2px solid #BEBEBE;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.idl-paypal-option .idl-paypal-title {
  color: #0070ba; /* Màu xanh thương hiệu PayPal */
  font-family: "Geist", sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.idl-paypal-option .idl-paypal-sub {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #484848;
}

/* ===== Place Order Button ===== */
.idl-place-order-btn {
  width: 100%;
  background: transparent; /* Xanh PayPal */
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
}


.idl-order-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #484848;
  text-align: center;
}

/* ===== Remove Modal & Confirm Modal ===== */
/* Modal overlay */
.idl-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Modal box */
.idl-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 300px;
  text-align: center;
  border: 2px solid #BEBEBE;
  font-family: Geist, sans-serif;
}

.idl-modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.idl-modal-actions button {
  flex: 1;
  padding: .5rem 1rem;
  border-radius: 6px;
  border: 1px solid #BEBEBE;
  cursor: pointer;
  font-weight: 600;
}

#idl-confirm-remove{
  background: #000;
  color: #fff;
}


#idl-confirm-cod{
  background: #000;
  color: #fff;
}

#idl-cancel-remove {
  background: #fff;
  color: #000;
}

#idl-cancel-cod {
  background: #fff;
  color: #000;
}

/* ===== Error Message ===== */
.idl-error {
  border: 2px solid #ef4444 !important; /* đỏ */
  border-radius: 6px;
}

.idl-error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  /* Container chuyển về cột */
  .idl-order-checkout {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Form lên trên */
  .idl-checkout-form-wrapper {
    width: 100%;
    order: 1;
  }

  /* Summary xuống dưới */
  .idl-order-summary {
    width: 100%;
    order: 2;
  }

  /* Grid 2 cột -> 1 cột */
  .idl-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Flex 2 -> xếp dọc */
  .idl-flex-2 {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* City-State và Zip đều full width */
  .idl-form-city-state,
  .idl-zip-container {
    width: 100% !important;
  }

  /* Input state/city full width */
  .idl-input-state,
  .idl-input-city,
  .idl-input-zip {
    width: 100% !important;
  }

  /* Payment methods: xếp dọc */
  .idl-payment-method-button {
    flex-direction: column;
  }

  .idl-payment-option {
    width: 100%;
  }

  .idl-paypal-button-container {
    width: 100%;
  }
}

/* Style PayPal button như nút custom */
#idl-paypal-button-container .paypal-button {
  background: #000 !important;
  color: #fff !important;
  font-family: Geist, sans-serif;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
}

/* ===== Order Success Block ===== */
#idl-order-success {
  background: #F5F5F5;
  border: 2px solid #BEBEBE;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  font-family: "Geist", sans-serif;
  color: #484848;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#idl-order-success h2 {
  font-size: 1.75rem; /* bigger than other headings */
  font-weight: 700;
  color: #000000; /* primary heading color */
  margin: 0 0 0.5rem 0;
}

#idl-order-success p#idl-success-message {
  font-size: 1rem;
  font-weight: 500;
  color: #484848;
  margin: 0 0 0.75rem 0;
}

#idl-success-details {
  font-family: monospace;
  color: #000000;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  padding: 0.75rem;
  border-radius: 6px;
  text-align: left;
}

/* Match the 'Return to shop' link to other buttons style */
.idl-back-home {
  display: inline-block;
  margin-top: 1rem;
  background: #000;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idl-back-home:hover {
  opacity: 0.95;
}

/* ===== Loading Overlay & Spinner ===== */
#idl-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.idl-loading-spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.15);
  border-top-color: #ffffff;
  animation: idl-spinner 1s linear infinite;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

@keyframes idl-spinner {
  to { transform: rotate(360deg); }
}
















