input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
  -webkit-text-fill-color: #042b56 !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
  -webkit-text-fill-color: #042b56 !important;
}

.review-card .form-control {
  color: #042b56;
}

:root {
  --dark-blue1: #0B335A;
  --dark-blue2: #1f5e9d;
  --hover-blue1: #1761a0;
  --hover-blue2: #0b4a83;
}

/* ---------- WRAPPER ---------- */
.review-container {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  padding: 2rem 1rem;
}

/* ---------- FORM GRID ---------- */
.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

/* ---------- CARD ---------- */
.review-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(11, 51, 90, 0.3);
  text-align: left;
  max-width: 700px;
  width: 100%;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Gradient border (top only) */
.review-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #042B56 0%, #118AF2 50%, #0DC3F4 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 2;
}

/* ---------- REQUIRED ASTERISK ---------- */
.req {
  color: #dc2626;
  margin-left: 1px;
}

/* ---------- LABEL ---------- */
.review-card label.form-label {
  margin: 0 0 6px;
  font-weight: 600;
  color: #042b56;
  font-size: 15px;
  line-height: 1.4;
  display: block;
}

/* ---------- HEADINGS ---------- */
.review-card h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: #042b56;
  font-weight: 700;
}

.review-card p.note {
  color: #042b56;
  font-size: 0.9rem;
  text-align: center;
  margin-top: -8px;
}

/* ---------- ALERTS ---------- */
.alert {
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: 500;
  text-align: center;
  font-size: 14px;
  transition: all 0.5s ease;
  opacity: 1;
}

.alert-success {
  background: #e6ffed;
  border-left: 4px solid #30a46c;
  color: #155724;
}

.alert-error {
  background: #ffe6e6;
  border-left: 4px solid #e63946;
  color: #7a1a1a;
}

/* ---------- EMAIL INLINE ERROR ---------- */
.email-error {
  font-size: 12px;
  color: #e63946;
  margin: 4px 0 0 2px;
  min-height: 16px;
  display: none;
}
.email-error.visible {
  display: block;
}
.form-control.input-error {
  border-color: #e63946 !important;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* ---------- FORM ELEMENTS ---------- */
.review-card .form-control {
  border: 1.6px solid #aabcd4;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.review-card .form-control:focus {
  border-color: var(--dark-blue2);
  box-shadow: 0 0 6px rgba(11, 51, 90, 0.15);
  outline: none;
}

/* ---------- CUSTOM FILE FIELD ---------- */
.custom-file-field {
  position: relative;
  width: 100%;
  margin-top: 6px;
}

.custom-file-field input[type="file"] {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 3;
}

.custom-file-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.6px solid #aabcd4;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 15px;
  background-color: #fff;
  color: #7b8a9a;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.custom-file-field label i {
  color: #118AF2;
  font-size: 1.1rem;
}

.custom-file-field:hover label {
  border-color: #042b56;
  box-shadow: 0 0 6px rgba(17, 138, 242, 0.2);
}

.custom-file-field label.filled {
  color: #042B56;
  font-weight: 500;
}

/* ---------- CUSTOM SELECT DROPDOWN ---------- */
.csd-wrapper {
  position: relative;
  width: 100%;
}

.csd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.6px solid #aabcd4;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 15px;
  background: #fff;
  color: #7b8a9a;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  outline: none;
}

.csd-trigger.filled {
  color: #042b56;
}

.csd-trigger:focus,
.csd-trigger.open {
  border-color: #1f5e9d;
  box-shadow: 0 0 6px rgba(11, 51, 90, 0.15);
}

.csd-trigger.field-error {
  border-color: #e63946 !important;
  box-shadow: 0 0 6px rgba(230, 57, 70, 0.4) !important;
}

.csd-arrow {
  font-size: 12px;
  color: #042b56;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.csd-trigger.open .csd-arrow {
  transform: rotate(180deg);
}

.csd-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.6px solid #aabcd4;
  border-radius: 10px;
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(11, 51, 90, 0.12);
}

.csd-dropdown.open {
  display: block;
}

.csd-dropdown::-webkit-scrollbar { width: 5px; }
.csd-dropdown::-webkit-scrollbar-track { background: transparent; }
.csd-dropdown::-webkit-scrollbar-thumb { background: #aabcd4; border-radius: 999px; }

.csd-option {
  padding: 10px 15px;
  font-size: 14px;
  color: #042b56;
  cursor: pointer;
  transition: background 0.15s ease;
}

.csd-option:hover {
  background: #f0f5ff;
}

.csd-option.selected {
  font-weight: 600;
  background: #e8f0fe;
}

/* ---------- BUTTON ---------- */
.review-card button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, #0B335A, #1f5e9d);
  cursor: pointer;
  transition: all 0.3s ease;
}

.review-card button:hover {
  box-shadow: 0 5px 10px rgba(11, 51, 90, 0.25);
  transform: translateY(-2px);
}

/* ---------- STAR RATING (half-star) ---------- */
.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.star-rating {
  display: flex;
  font-size: 2rem;
  line-height: 1;
  gap: 4px;
  cursor: pointer;
}

.star {
  color: #ccc;
  transition: color 0.2s ease;
  user-select: none;
}

.star.full,
.star.hover-full {
  background: linear-gradient(135deg, #ffffff 10%, #0396FF 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.star.half,
.star.hover-half {
  background: linear-gradient(90deg,
    #ffffff 0%, #ffffff 10%, #0396FF 50%,
    #ccc 50%, #ccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.star:focus { outline: none; }

.rating-value {
  font-weight: 600;
  font-size: 1rem;
  color: #042b56;
  min-width: 28px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .review-container {
    padding: 1.5rem 1rem;
    min-height: auto;
  }
  .form-row { flex-direction: column; gap: 0; }
  .review-card { padding: 1.8rem 1.2rem; max-width: 95%; border-radius: 12px; }
  .review-card h2 { font-size: 1.5rem; }
  .review-card label.form-label { margin-bottom: 3px; }
  .form-group { margin-bottom: 14px; }
  .review-card label.form-label { margin: 0 0 6px; font-size: 14px; }
  .review-card .form-control { padding: 11px 14px; font-size: 14px; }
  .custom-file-field { margin-top: 6px; }
  .custom-file-field label { padding: 11px 14px; font-size: 14px; }
  .star-rating { font-size: 1.5rem; }
  textarea.form-control { margin-top: 6px; }
  .review-card button { font-size: 14px; padding: 11px; margin-top: 10px; }
}

@media (max-width: 480px) {
  .review-container { padding: 1.2rem 0.8rem; }
  .review-card { padding: 1.5rem 1rem; }
  .review-card h2 { font-size: 1.3rem; }
  .form-group { margin-bottom: 12px; }
  .review-card label.form-label { font-size: 13.5px; }
  .review-card .form-control { padding: 10px 12px; font-size: 13.5px; }
  .custom-file-field label { padding: 10px 12px; font-size: 13.5px; }
  .star-rating { font-size: 1.3rem; }
  .review-card button { font-size: 13px; padding: 10px; }
}
