/* ============================================================================
   COMMON NOTIFICATION PREFERENCES FORM STYLES
   Shared by NC, FL, SC preferences pages
   ============================================================================ */

/* ============================================================================
   FORM SECTIONS
   ============================================================================ */

.form-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.form-section {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.form-section.notification-preferences {
  border-left: 4px solid #28a745;
}

.form-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 0.75rem;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-label {
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 0.375rem;
  display: block;
  font-size: 0.875rem;
}

.form-control {
  margin-bottom: 0.5rem;
}

.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder {
  font-size: 0.875rem;
  color: #6c757d;
}

.form-text {
  line-height: 1.4;
  color: #666666;
  font-size: 0.875rem;
}

.form-text.muted {
  margin-top: 0.375rem;
  display: block;
}

/* ============================================================================
   FORM GROUPS & PREFERENCES
   ============================================================================ */

.preference-group {
  margin-bottom: 1.25rem;
}

.form-check {
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  min-height: 1.25rem;
  padding-left: 2rem;
}

.form-check-input {
  margin-right: 0.5rem;
  margin-top: 0;
}

.form-check-label {
  margin-left: 0;
  font-size: 0.875rem;
  line-height: 1.3;
  color: #495057;
  cursor: pointer;
  user-select: none;
}

.notification-preferences-form {
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================================================
   ACCORDION STYLES
   ============================================================================ */

.notification-accordion {
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
}

.accordion-header {
  background-color: #f8f9fa;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-header:hover {
  background-color: #e9ecef;
}

.accordion-header .form-check {
  margin-bottom: 0;
  padding-left: 0;
}

.accordion-header .form-check-input {
  margin-right: 0.5rem;
  margin-top: 0;
}

.accordion-header .form-check-label {
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  margin-left: 0;
}

.accordion-controls {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.accordion-controls .btn {
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-actions .btn {
  width: 80px;
  height: 35px;
  font-size: 14px;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  scroll-behavior: smooth;
}

.accordion-content.expanded {
  max-height: 600px;
  overflow-y: auto;
}

.accordion-body {
  padding: 1rem;
  background-color: #fff;
  border-top: 1px solid #dee2e6;
}

/* ============================================================================
   ACCORDION TABS
   ============================================================================ */

.accordion-tabs {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px 4px 0 0;
}

.accordion-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s ease;
  text-align: center;
}

.accordion-tab:hover {
  background-color: #e9ecef;
  color: #495057;
}

.accordion-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #fff;
}

.accordion-tab-content {
  display: none;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.accordion-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   CONSENT SECTIONS
   ============================================================================ */

.consent-section {
  border: 2px solid #007bff !important;
  border-radius: 8px !important;
  padding: 1rem !important;
  background-color: #f8f9fa !important;
  margin-top: 1rem !important;
  display: block !important;
}

.consent-checkbox {
  margin-bottom: 0.5rem !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
}

.consent-checkbox .form-check-input {
  margin-top: 0.25rem !important;
  flex-shrink: 0 !important;
}

.consent-checkbox .form-check-label {
  font-weight: 500 !important;
  color: #2c2c2c !important;
  line-height: 1.4 !important;
  margin-left: 0 !important;
}

.consent-section.is-invalid {
  border: 1px solid #dc3545 !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
  background-color: #fff !important;
}

.accordion-content.expanded .consent-section {
  display: block !important;
  visibility: visible !important;
}

/* ============================================================================
   EXAMPLE NOTIFICATIONS
   ============================================================================ */

.example-group {
  margin-bottom: 1.25rem;
}

.text-bubble {
  background: #e9ecef;
  padding: 0.875rem;
  border-radius: 6px;
  margin-bottom: 0.375rem;
}

.text-bubble p {
  margin: 0;
  line-height: 1.4;
  color: #495057;
  font-size: 0.875rem;
}

.text-bubble a {
  color: #007bff;
}

/* ============================================================================
   FORM ACTIONS
   ============================================================================ */

.form-actions {
  text-align: right;
  padding: 1.25rem 0;
  border-top: 1px solid #dee2e6;
}

.form-actions .btn {
  margin-right: 0.5rem;
  min-width: 80px;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.form-actions .btn:last-child {
  margin-right: 0;
}

.form-actions .btn-primary:disabled,
.form-actions .btn-primary[disabled] {
  opacity: 0.5;
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  color: #fff;
}

.form-actions .btn-primary:not(:disabled):not([disabled]) {
  opacity: 1;
  cursor: pointer;
}

.form-help-text-wrapper {
  min-height: 0;
  margin-bottom: 0;
}

#profile-form-help-text:empty {
  display: none !important;
  margin: 0;
  padding: 0;
}

#profile-form-help-text {
  text-align: right !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  display: block;
  width: 100%;
  font-size: 0.875rem;
}

.form-status {
  width: 100%;
  padding-top: 0.25rem;
}

/* ============================================================================
   EMAIL / TEXT NOTIFICATION STATUS
   ============================================================================ */

#email-notification-status {
  background-color: transparent;
  padding-left: 0; /* same visual indent as text: email is inside .accordion-tab-content (1rem) */
  padding-top: 16px;
}

#text-notification-status {
  background-color: transparent;
  padding-left: 1rem;
}
