/* FORM START */

.contact-h2 {
  padding: 2rem;
}

/* FIELDSET START*/
.number {
  padding: 0.06rem 0.3rem;
  border-radius: 50%;
  background-color: var(--color-black);
  color: var(--color-white);
}

fieldset {
  margin: 0.3rem;
  border-color: #0a0a0a;
}

/* FIELDSET FININSH*/
.contact-info,
.car-info,
.additional-info {
  display: block;
}

label {
  display: block;
  margin: 0.6rem 0;
}

/* Radio Button START */

/* This is put Front, Back with their buttons in one line*/
.battery-radio-button {
  display: inline-block;
  padding-right: 2rem;
  padding-left: 0.6rem;
}

/* This is put Slightly, Completely with their buttons in one line*/
.condition-button {
  display: inline-block;
  padding-right: 1.25rem;
  padding-left: 0.6rem;
}

/* Radio Buttons FINISH*/

/* How would you like to be contacted */

.contact-option-button {
  display: inline-block;
  padding-right: 2rem;
  padding-left: 0.6rem;
}

/* Completely Slightly Picture explanation Start*/

.condition-buttons {
  margin-top: 1em;
}

.condition-label-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 30px;
}

.condition-button {
  margin-right: 5px;
  cursor: pointer;
}

.tooltip-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 50%;
  background-color: #0039e6;
  color: var(--color-white);
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  margin-left: 5px;
}

.tooltip-image {
  display: none;
  position: absolute;
  top: 130%;
  left: 0;
  width: 220px;
  background: var(--color-white);
  border: 1px solid #ccc;
  padding: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.condition-label-wrapper:hover .tooltip-image,
.tooltip-image.is-visible {
  display: block;
}

/* Completely Slightly Picture explanation END*/

.contact-method {
  border: 0;
  padding: 0;
  margin: 1.5rem 0;
  min-inline-size: 0; /* fixes weird fieldset sizing in Firefox */
}

.sub-legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* This is put I understand with its check button in one line*/
.understand {
  display: inline-block;
  padding-right: 1.25rem;
}

/* Submit and Reset button START*/

.button-request,
.button-reset {
  font-family: "Poppins", sans-serif;
  background-color: var(--color-orange);
  border-radius: 3.1rem;
  cursor: pointer;
  border: none;
  padding: 0.6rem 1.25rem;
  margin: 0.6rem;
}

.button-request {
  color: var(--color-black);
  font-weight: bolder;
}

.button-reset {
  background-color: var(--color-black);
  color: var(--color-white);
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.button-request:hover,
.button-request:active {
  background-color: var(--color-orange-hover);
}

.button-reset:hover,
.button-reset:active {
  background-color: #635b53;
}

/* Submit and Reset button FINISH*/

/*ERRORS */

.required {
  color: #b50000;
}

html[data-theme="dark"] .required {
  color: #f50000;
}

.input-error {
  border: 2px solid #a8251d;
  background-color: #fff6f6;
}

.error {
  color: #a8251d;
  font-size: 0.9rem;
  margin-top: 4px;
}

html[data-theme="dark"] .error {
  color: #ff6b6b;
}

.error-icon {
  fill: #a8251d;
  display: inline;
  vertical-align: middle;
}

html[data-theme="dark"] .error-icon {
  fill: #ff6b6b;
}

input[aria-invalid="false"]:not(:placeholder-shown) {
  border: 4px solid #64c569;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

/* ============================================
   MODAL STYLING START
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

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

.modal-box {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  /* REMOVED transform and animation from here */
}

.modal-overlay.active .modal-box {
  animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-box::before {
  content: "✓";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: var(--color-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-white);
  font-weight: bold;
  box-shadow: 0 4px 20px rgba(219, 148, 35, 0.4);
  animation: checkmarkPop 0.5s ease 0.2s backwards;
}

@keyframes checkmarkPop {
  0% {
    transform: translateX(-50%) scale(0);
  }
  50% {
    transform: translateX(-50%) scale(1.1);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

.modal-box h2 {
  margin: 1.5rem 0 1rem 0;
  color: var(--color-orange);
  font-size: 1.75rem;
  font-weight: 600;
}

.modal-box p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.modal-button {
  margin-top: 1rem;
  padding: 0.875rem 2rem;
  background: var(--color-orange);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(219, 148, 35, 0.3);
}

.modal-button:hover {
  background: var(--color-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(219, 148, 35, 0.4);
}

.modal-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(219, 148, 35, 0.3);
}

.modal-button:focus {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

/* DARK THEME MODAL */

html[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.85);
}

html[data-theme="dark"] .modal-box {
  background: #1a1a1a;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .modal-box::before {
  background: var(--color-orange);
  box-shadow: 0 4px 20px rgba(219, 148, 35, 0.5);
}

html[data-theme="dark"] .modal-box h2 {
  color: var(--color-orange);
}

html[data-theme="dark"] .modal-box p {
  color: #e2e8f0;
}

html[data-theme="dark"] .modal-button {
  background: var(--color-orange);
  color: #000000;
  box-shadow: 0 4px 12px rgba(219, 148, 35, 0.4);
}

html[data-theme="dark"] .modal-button:hover {
  background: var(--color-orange-hover);
  box-shadow: 0 6px 16px rgba(219, 148, 35, 0.5);
}

html[data-theme="dark"] .modal-button:focus {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .modal-box {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }

  .modal-box h2 {
    font-size: 1.5rem;
  }

  .modal-box::before {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    top: -25px;
  }

  .modal-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* ============================================
   MODAL STYLING FINISH
   ============================================ */

@media (min-width: 59.3rem) {
  form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    vertical-align: middle;
    min-height: 31rem;
    flex: 1;
    margin: 0;
    padding: 0;
  }

  .button-container {
    display: flex;
    flex-direction: row;
  }
}
/* DARK MODE */

html[data-theme="dark"] input::placeholder {
  color: var(--color-black);
}

html[data-theme="dark"] form a {
  color: var(--color-orange);
}

html[data-theme="dark"] .number {
  background: var(--color-white);
  color: var(--color-black);
}

html[data-theme="dark"] .button-reset {
  background-color: var(--color-white);
  color: var(--color-black);
}

html[data-theme="dark"] .button-reset:hover {
  opacity: 0.7;
}

html[data-theme="dark"] .button-request:focus {
  color: var(--color-black);
  background-color: var(--color-orange);
}

html[data-theme="dark"] .button-request:hover {
  background-color: #db8023;
}

html[data-theme="dark"] .tooltip-image {
  color: var(--color-black);
}
