/* === Dynamic Order Form Styles === */
.dynamic-form-container {
  font-family: "DM Sans", sans-serif;
  width: 100%;
  max-width: 100%;
  padding: 4rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(103, 61, 230, 0.05);
  box-sizing: border-box;
}

/* Tabs / Buttons */
.service-buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 4rem;
}

.service-btn {
  flex: 1;
  text-align: center;
  background: #f4f5ff;
  color: #000; /* black text */
  border: 2px solid transparent;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.service-btn:hover {
  background: #d5dfff;
  border-color: #d5dfff;
}

.service-btn.active {
  background: #d5dfff;
  color: #000;
  border-color: #d5dfff;
}

/* Layout */
.form-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem; /* Added space between tabs and form */
}

.form-area {
  flex: 2;
  min-width: 320px;
}

.summary-box {
  flex: 1;
  min-width: 260px;
  border: 1px solid #ececff;
  border-radius: 10px;
  padding: 1.5rem;
  background-color: #fafbff;
}

.summary-box h3 {
  margin-top: 0;
  color: black;
}

/* Form styling */
.styled-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    /* spacing between groups (fields) */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    /* small space between label and field */
}

.styled-form label {
    font-weight: 500;
    color: #2a2a2a;
    font-size: 15px;
}

.styled-form input,
.styled-form select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #ececff;
    font-size: 15px;
    background-color: #fafbff;
    transition: all 0.25s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Add dropdown arrow */
.styled-form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='16' height='16' fill='%235025D1' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.styled-form input:focus,
.styled-form select:focus {
    border-color: #673de6;
    background-color: #ffffff;
    outline: none;
}

.custom-select {
    position: relative;
    width: 100%;
    border: 1px solid #ececff;
    border-radius: 10px;
    background-color: #fafbff;
    cursor: pointer;
    font-size: 16px;
    color: black;
    user-select: none;
}

.custom-select-trigger {
    display: block;
    width: 100%;
    padding: 0.9rem 1.2rem;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
}

/* Arrow indicator */
.custom-select-trigger::after {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid #673de6;
    border-bottom: 2px solid #673de6;
    transform: rotate(45deg);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

/* Optional: rotate arrow when open */
.custom-select.open .custom-select-trigger::after {
    transform: rotate(-135deg);
}

.custom-options {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    width: 100%;
    border: 1px solid #ececff;
    border-radius: 10px;
    background-color: #fafbff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 10;
}

.custom-select.open .custom-options {
  opacity: 1;
  visibility: visible;
}

.custom-option {
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  border-bottom: 1px solid #ececff;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: #d5dfff;
}


.btn-submit {
    background-color: #673de6;
    color: #fff;
    border: none;
    padding: 0.9rem 1.3rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.25s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: #5025d1;
}

.btn-submit:hover {
  background-color: #5025d1;
}

* Error message styling */ .form-error {
    background: #ffe6e6;
    color: #a30000;
    border: 1px solid #ffbfbf;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 14px;
}

@media (max-width: 600px) {
    .dynamic-form-container {
        padding: 1rem !important;
    }
    .styled-form input,
    .styled-form select,
    .custom-select {
        font-size: 16px;
    }
    .service-buttons {
        margin-bottom: 1rem;
    }
}