.contact-section {
  padding: 72px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 920px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

#itemsTable th:nth-child(3),
#itemsTable td:nth-child(3) {
  text-align: center;
}

.form-card {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.form-card h3 {
  margin: 0 0 20px;
  font-size: 20px;
  color: var(--fg);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: rgba(242, 242, 242, 0.6);
  font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--fg);
  font-family: inherit;
}

/* Specific visual for event type dropdown to match site identity */
#eventType {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 38px 10px 12px;
  /* space for custom caret */
  background-image: linear-gradient(45deg, transparent 50%, rgba(242, 242, 242, 0.6) 50%),
    linear-gradient(135deg, rgba(242, 242, 242, 0.6) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  -webkit-text-fill-color: var(--fg);
}

#eventType::-ms-expand {
  display: none;
}

/* Make opened dropdown list match form input grey background */
#eventType option,
#eventType optgroup {
  background-color: #3a3a3a !important;
  color: var(--fg) !important;
}

#eventType option:hover,
#eventType option:checked {
  background-color: #4a4a4a !important;
}



.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* utility: make a form-group span both columns */
.form-row .full {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--fg);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(242, 242, 242, 0.6);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.status-message {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(242, 242, 242, 0.6);
}

.invoice {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.invoice-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.invoice-meta {
  font-size: 12px;
  color: rgba(242, 242, 242, 0.6);
  line-height: 1.6;
}

.invoice-meta strong {
  color: var(--fg);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: rgba(242, 242, 242, 0.6);
  font-weight: 600;
  font-size: 12px;
}

.text-right {
  text-align: right;
}

.totals {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
  min-width: 220px;
  margin-left: auto;
}

.total-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(242, 242, 242, 0.6);
  font-size: 13px;
}

.total-line.grand {
  color: var(--fg);
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
}

/* Estimate toggle button styles */
.btn-estimate {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: rgba(52, 211, 153, 0.95);
}

.btn-estimate:hover {
  background: rgba(52, 211, 153, 0.16);
}

.btn-estimate.active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 0.95);
}

.estimate-indicator {
  margin-left: 12px;
  font-size: 13px;
  color: rgba(52, 211, 153, 0.95);
  display: inline-block;
  align-self: center;
}

/* Tooltip basic styles */
.tooltip-container {
  display: inline-block;
  margin-left: 6px;
  position: relative;
  cursor: help;
}

.tooltip-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  text-align: center;
  font-weight: bold;
}

.tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  /* Position above */
  left: 50%;
  margin-left: -110px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}