* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  color: #333;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0px 15px;
}

.title {
  text-align: center;
  color: #333;
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 10px;
  margin-top: 0px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .col-md-8 {
  flex: 2;
}

.form-row .col-md-4 {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #555;
  font-size: 1rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Specific styles for select elements to match input appearance */
select.form-control {
  height: auto;
  min-height: 38px;
  background-color: #fff;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  padding-right: 30px;
  color: #333;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-text-fill-color: #333;
}

select.form-control:focus {
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23007bff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

/* Ensure consistent line height */
select.form-control option {
  padding: 4px 8px;
}

/* RTL specific styles */
[dir="rtl"] select.form-control {
  background-position: left 8px center;
  padding-right: 12px;
  padding-left: 30px;
}

.offer-selection {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.offer-selection img {
  max-width: 100%;
  max-height: 80px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.offer-selection img:hover {
  transform: scale(1.05);
}

/* Modal styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease-in-out;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: zoomIn 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 200px;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: none;
}

.modal-loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.offer-selection .offer-info {
  flex: 1;
  text-align: center;
}

.offer-selection h5 {
  margin: 5px 0;
  color: #333;
  font-size: 20px;
  font-weight: 500;
}

.offer-selection span {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.d-none {
  display: none;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.preloader::before {
  content: "";
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #3498db;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

form.loading .preloader {
  display: flex;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  width: 100%;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-lg {
  padding: 15px 40px;
  font-size: 18px;
}

.cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333;
  width: 60px;
  height: 100%;
  border-radius: 6px 0 0 6px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* RTL specific styles for cart icon */
[dir="rtl"] .cart-icon {
  border-radius: 0 6px 6px 0;
  right: 0;
  left: auto;
}

#submit-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 60px;
  border-radius: 6px;
}

/* RTL specific styles for submit button */
[dir="rtl"] #submit-button {
  padding-left: 30px;
  padding-right: 60px;
}

#info-privacy {
  text-align: center;
  margin-bottom: 15px;
}

#info-privacy small {
  font-size: 12px;
  font-weight: 500;
}

#info-privacy a {
  color: #007bff;
  text-decoration: none;
}

#info-privacy a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
