.guest-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.guest-form-container {
  background: var(--surface);
  border-radius: 14px;
  padding: 0;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.guest-form {
  padding: 30px;
  position: relative;
}

.guest-form h2 {
  margin: 0 0 24px 0;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
}

.table-info-display {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--success, #10b981);
  text-align: center;
}

.field-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  display: block;
}

.field-note--warning {
  color: #b54708;
  font-style: normal;
  font-weight: 600;
}

input[readonly] {
  background-color: var(--surface-2, #f5f5f5);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0px;
}

.form-group label {
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-500, #c39b5c);
  box-shadow: 0 0 0 2px rgba(195, 155, 92, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle, #aaa);
}

.notes-section label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

.notes-section textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  /* no position:relative — close-btn positions relative to guest-form-container */
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  z-index: 5;
}

.close-btn:hover {
  background: var(--surface-2, rgba(0,0,0,0.06));
  color: var(--text);
}

.action-buttons {
  gap: 15px;
  justify-content: flex-end;
}

.reserve-btn,
.edit-btn,
.cancel-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.reserve-btn {
  background: #000;
  color: white;
}

.reserve-btn:hover:not(:disabled) {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.edit-btn {
  background: var(--info, #3b82f6);
  color: white;
}

.edit-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cancel-btn {
  background: var(--danger, #ef4444);
  color: white;
}

.cancel-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.copy-payment-link-btn {
  background: var(--info, #3b82f6);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.15s;
}

.copy-payment-link-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.copy-payment-link-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.reserve-btn:disabled,
.edit-btn:disabled,
.cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger, #ef4444);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 3px solid var(--danger, #ef4444);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .guest-form {
    padding: 20px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .close-btn {
    top: -260px;
  }
}

/* Inline form styles */
.guest-form-inline {
  font-family: 'Poppins', sans-serif;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guest-info-section {
  display: flex;
  gap: 20px;
    align-items: stretch;
}

.guest-info-main.notes {
    max-width: 40%;
    align-items: end;
}

/* Guest info main section */
.guest-info-main {
  background: var(--surface-2, #f0f0f0);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex: 1;
}

.guest-info-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.guest-info-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 36px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  line-height: 1.1;
  white-space: nowrap;
}

.divider {
  width: 1px;
  height: 100px;
  background: var(--border);
  flex-shrink: 0;
}

.guest-info-content {
  flex: 1;
  opacity: 0.6;
}

/* Notes and buttons container */
.notes-and-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
}

.guest-form-inline .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.guest-form-inline .form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.guest-form-inline .form-group label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: block;
    position: absolute;
    left: 16px;
    top: 8px;
    margin: 0;
    z-index: 9;
}

.guest-form-inline .form-group input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 16px 8px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  line-height: 24px;
  min-height: 60px;
}

.guest-form-inline .form-group input::placeholder {
  color: var(--text-subtle, #aaa);
  font-weight: 400;
}

.guest-form-inline .form-group input:focus {
  outline: none;
  border-color: var(--border-strong, #888);
  box-shadow: none;
}

/* Notes section - white background with gray border */
.guest-form-inline .notes-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 20px 18px 20px;
  opacity: 0.85;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  flex:1;
}

.guest-form-inline .notes-section label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: block;
    position: absolute;
    left: 16px;
    top: 10px;
    line-height: 1;
    text-align: left;
}

.guest-form-inline .notes-section textarea {
  background: transparent;
  border: none;
  border-radius: 0;
  flex: 1;
  resize: none;
  color: var(--text);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  padding: 0;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  text-align: left;
}

.guest-form-inline .notes-section textarea::placeholder {
  color: var(--text-subtle, #aaa);
  font-weight: 300;
}

.guest-form-inline .notes-section textarea:focus {
  border: none;
  outline: none;
  box-shadow: none;
}

/* Action buttons - positioned to the right of notes */
.guest-form-inline .action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 177px;
}

/* Buttons */
.guest-form-inline .reserve-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
}

.guest-form-inline .reserve-btn:hover {
  background: #333;
}

.guest-form-inline .edit-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
}

.guest-form-inline .edit-btn:hover {
  background: #333;
}

.guest-form-inline .swap-btn {
  background: var(--success, #10b981);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}

.guest-form-inline .swap-btn:hover {
  opacity: 0.9;
}

.guest-form-inline .cancel-btn {
  background: var(--danger, #ef4444);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}

.guest-form-inline .cancel-btn:hover {
  opacity: 0.9;
}

/* Hide modal close in inline mode */
.guest-form-inline .close-btn {
  display: none;
}

@media (max-width: 768px) {
  .guest-form-inline .form-row { grid-template-columns: 1fr; }
}

/* Deposit Section Styles */
.deposit-section {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 15px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

.checkmark {
  margin-left: 8px;
  font-size: 14px;
  color: #666;
}

.deposit-section input[name="deposit_amount"]:disabled {
  background-color: var(--surface-2, #f5f5f5);
  color: var(--text-muted);
  cursor: not-allowed;
}

.deposit-section .form-group:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notes section styling */
.notes-full-width {
  grid-column: 1 / -1;
  width: 100%;
}

.notes-section {
  width: 100%;
}

.notes-section .form-group {
  width: 100%;
}

.notes-section textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

/* Minimal reset */
.guest-form-overlay {
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(6px);
}

.guest-form-container {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.guest-form {
  padding: 24px;
}

.guest-form h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.table-info-display {
  background: var(--surface-2);
  border-color: var(--border);
  border-radius: 10px;
  color: var(--text);
}

.form-group label,
.notes-section label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  border-radius: 10px;
}

.reserve-btn,
.edit-btn,
.cancel-btn,
.copy-payment-link-btn {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.reserve-btn {
  background: var(--brand-900);
}

.reserve-btn:hover:not(:disabled) {
  background: var(--brand-700);
  box-shadow: none;
}

.edit-btn,
.copy-payment-link-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.edit-btn:hover:not(:disabled),
.copy-payment-link-btn:hover:not(:disabled) {
  background: var(--surface-3);
  transform: none;
}

.cancel-btn {
  background: var(--danger-bg);
  color: var(--danger);
}

.cancel-btn:hover:not(:disabled) {
  background: #fee2e2;
  transform: none;
}
