
#opi-form {
  direction: rtl;
  text-align: right;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.opi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.opi-col {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
}

.opi-summary {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  font-size: 20px;
  line-height: 2;
}

.opi-submit {
  display: block;
  margin: 20px auto 0;
  background-color: #b3004b;
  color: white;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  width: 100%;
  max-width: 680px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.opi-submit:hover {
  background-color: #a00044;
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

input[name="shipping_address"],
#opi-form input,
#opi-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
}

.opi-livraison {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
}

.opi-livraison label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 17px;
  background: #faf9fa;
  color: #7c7c7c;
  cursor: pointer;
  transition: border 0.2s, background 0.2s;
  width: 100%;
  font-weight: 500;
  white-space: nowrap;
}

.opi-livraison input[type="radio"] {
  accent-color: #b3004b;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  margin-right: 0;
  cursor: pointer;
}

.opi-livraison label:has(input[type="radio"]:checked) {
  border: 2px solid #b3004b;
  background: #ffe9f3;
  color: #222;
}

#opi-form select {
  padding: 12px 16px 12px 38px;
  border: 1.5px solid #eee;
  border-radius: 10px;
  font-size: 17px;
  background: #faf9fa;
  color: #444;
  font-family: "Tajawal", "Cairo", sans-serif;
  appearance: none;
  outline: none;
  margin-bottom: 15px;
  line-height: 1.8;
  height: 48px;
  transition: border 0.2s, background 0.2s;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg width='20' height='20' fill='gray' xmlns='http://www.w3.org/2000/svg'><polygon points='6,8 14,8 10,14' /></svg>");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 18px 18px;
}

.opi-qty-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: none;
  box-shadow: none;
  overflow: hidden;
  width: fit-content;
  margin-top: 20px;
  font-family: 'Tajawal', 'Cairo', sans-serif;
}

.opi-qty-btn,
.opi-qty-display {
  height: 45px;
  width: 50px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-sizing: border-box;
}

.opi-qty-btn {
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  border: 1px solid #ccc;
  font-size: 26px;
  color: #000;
}

.opi-qty-btn:hover {
  background: #f0f0f0;
}

.opi-qty-display {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #000;
}

.opi-qty-wrapper .opi-qty-btn:first-child {
  border-right: none;
}

.opi-qty-wrapper .opi-qty-btn:last-child {
  border-left: none;
}

#opi-quantity {
  user-select: none;
}

@keyframes opi-vibrate {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-1px); }
}

.opi-submit.vibrate {
  animation: opi-vibrate 0.6s ease-in-out infinite;
}

/* Responsive for mobile and iPhone */
@media (max-width: 480px) {
  .opi-col {
    flex: 1 1 100%;
  }

  .opi-livraison label {
    flex-direction: row-reverse;
    justify-content: space-between;
    font-size: 15px;
    padding: 10px 12px;
    white-space: normal;
  }

  .opi-livraison input[type="radio"] {
    transform: scale(1.1);
    margin-left: 10px;
  }

  .opi-submit {
    font-size: 15px;
    padding: 12px 20px;
  }

  .opi-summary {
    font-size: 17px;
  }

  #opi-form select {
    font-size: 16px;
    padding: 10px 14px 10px 36px;
  }

  .opi-qty-btn,
  .opi-qty-display {
    width: 45px;
    height: 42px;
    font-size: 18px;
  }
}
.opi-livraison label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.opi-livraison input[type="radio"]:checked + span {
    border: none;
    font-weight: bold;
    color: #b3004b;
}