/* ============================
   ✅ Backdrop & Modal
============================ */
#backdrop,
#quote-modal {
  display: none;
  position: fixed;
  z-index: 999;
}

#backdrop {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

#quote-modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  z-index: 1000;
  width: clamp(250px, 90%, 600px);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #979797;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ============================
   ✅ Modal Layout
============================ */
.modal-img-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px;
}

#quote-modal h2 {
  font-size: 1.1rem;
  color: #353030;
  text-align: center;
  padding: 12px 5px;
  background: rgba(245, 158, 11, 0.8);
  margin: 0;
  width: 100%;
  word-wrap: break-word;
}

#quote-modal h2 span {
  color: #fff;
}

/* ============================
   ✅ Image & Form Elements
============================ */
#quote-product-image {
  max-width: 240px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

#quote-modal .modal-img-form > div:first-child,
#quote-modal form {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#quote-modal label {
  font-size: 0.8rem;
  color: #110f0f;
  margin-bottom: 4px;
}

#quote-modal label i {
  margin-right: 6px;
  color: #1d4ed8;
  font-size: 1.1rem;
  vertical-align: middle;
}

#quote-modal input,
#quote-modal textarea {
  padding: 10px;
  font-size: 0.75rem;
  width: 100%;
  background: #f8f8f8;
  border: thin solid #ddd;
  border-radius: 5px;
}

#quote-modal input[type="tel"] {
  border: none !important;
}

#quote-modal textarea {
  min-height: 80px;
  resize: vertical;
}

/* ============================
   ✅ Phone Input Components
============================ */
.phone-dropdown-wrapper {
  position: relative;
}

.phone-input-wrapper,
.phone-country {
  display: flex;
  align-items: center;
}

.phone-input-wrapper {
  border: thin solid #ddd;
  border-radius: 5px;
  background: #f8f8f8;
  overflow: hidden;
  margin-bottom: 10px;
  height: 42px;
}

.phone-country {
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
  background: #f9f9f9;
  border-right: thin solid #ddd;
}

.phone-country img {
  width: 22px;
  height: 16px;
  border-radius: 2px;
}

.phone-country span {
  font-weight: bold;
  font-size: 0.85rem;
}

.phone-country i {
  font-size: 1rem;
  color: #666;
}

#phone {
  flex: 1;
  border: none;
  padding: 0 12px;
  font-size: 0.85rem;
  background: transparent;
}

/* ============================
   ✅ Dropdown Components
============================ */
.dropdown-list,
#country-list li {
  display: flex;
}

.dropdown-list {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 2000;
  flex-direction: column;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dropdown-list.show {
  display: flex;
}

.dropdown-list input[type="text"] {
  width: 90%;
  margin: 8px auto;
  padding: 6px;
  border: thin solid #ddd;
  border-radius: 4px;
}

#country-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#country-list li {
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  gap: 8px;
}

#country-list li:hover {
  background: #f0f0f0;
}

#country-list li img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

#country-list li span {
  flex: 1;
  font-size: 0.9rem;
}

#country-list li small {
  font-weight: bold;
  color: #666;
}

/* ============================
   ✅ Buttons & Focus States
============================ */
.btn-qoute-con,
.close-btn,
button[type="submit"] {
  display: flex;
}

.btn-qoute-con {
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0 5px;
}

.close-btn,
button[type="submit"] {
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  font-weight: 600;
  justify-content: center;
}

button[type="submit"] {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
}

.close-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.close-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
}

/* Focus states */
#quote-modal input:focus,
#quote-modal textarea:focus,
.dropdown-list input[type="text"]:focus {
  background: #fff;
  border-color: #e55f3e;
  outline: none;
}

#form-response-message {
  display: none;
  text-align: center;
}

/* ============================
   ✅ Responsive
============================ */
@media (max-width: 600px) {
  .modal-img-form {
    grid-template-columns: 1fr;
  }

  #quote-product-image {
    max-width: 180px;
  }

  .btn-qoute-con {
    flex-direction: column;
  }
}
