/* 
  mac_forms.css
  Sleek, modern "Attio/Linear" style UI components for CRM forms.
  Provides classes for both stacked grid layouts (ideal for Modals) 
  and flat inline configurations (ideal for Detail pages).
*/

/* --- SECTION HEADERS --- */
.mac-form-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

/* --- ULTRA-PREMIUM macOS SETTINGS STYLE FORMS --- */

/* Modal Container Enhancement */
.mac-modal-content {
  background: #fbfbfd; /* Apple subtle gray */
  border-radius: 16px;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Stunning Header */
.ns-modal-header {
  padding: 24px 32px 16px 32px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}
.ns-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px -4px rgba(59,130,246,0.4);
}
.ns-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 4px 0;
}
.ns-modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.ns-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.ns-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Form Body */
.ns-modal-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Grouped Input Sections (iOS Style) */
.ns-form-group {
  margin-bottom: 28px;
}
.ns-group-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-left: 12px;
}

.ns-input-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.ns-input-row {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  transition: background 0.2s;
}
.ns-input-row:last-child {
  border-bottom: none;
}
.ns-input-row:focus-within {
  background: #f8fafc;
}

.ns-input-row label {
  flex: 0 0 160px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  margin: 0;
  user-select: none;
}

.ns-input-row input, 
.ns-input-row select, 
.ns-input-row textarea {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 14.5px;
  color: #0f172a;
  padding: 12px 0;
  height: auto;
  width: 100%;
}
.ns-input-row select {
  cursor: pointer;
  appearance: auto;
  padding-right: 0;
}
.ns-input-row input::placeholder, 
.ns-input-row textarea::placeholder {
  color: #cbd5e1;
  font-weight: 400;
}

/* Footer */
.ns-modal-footer {
  padding: 16px 32px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.ns-btn-cancel {
  padding: 10px 20px;
  border-radius: 8px;
  background: white;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}
.ns-btn-cancel:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.ns-btn-save {
  padding: 10px 24px;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37,99,235,0.2);
  transition: all 0.2s;
}
.ns-btn-save:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 8px rgba(37,99,235,0.3);
  transform: translateY(-1px);
}
