/* Society of Will Writers – partner site theme */
:root {
  --sww-dark: #022c22;
  --sww-green: #047857;
  --sww-green-light: #34d399;
  --sww-gold: #b45309;
  --sww-cream: #fef3c7;
  --sww-text: #064e3b;
}

body.society {
  color: #0f172a;
}

/* SWW accent overrides for buttons/links */
.society .btn-primary {
  background-color: var(--sww-green);
  color: white;
}
.society .btn-primary:hover {
  background-color: #059669;
}

.society .text-accent {
  color: var(--sww-green);
}
.society .hover\:text-accent:hover {
  color: var(--sww-green-light);
}

.society .border-accent {
  border-color: var(--sww-green);
}

.society .bg-dark {
  background-color: var(--sww-dark);
}

img[class*="transition-transform"] {
  will-change: transform;
}

@media (min-width: 768px) {
  .mobile-menu-panel {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .mobile-menu-panel {
    display: none;
  }
  .mobile-menu-visible .mobile-menu-panel {
    display: block;
  }
}

/* CRM nav dropdown (desktop) */
.nav-dropdown {
  position: relative;
}
.nav-dropdown .nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  min-width: 160px;
  padding: 0.5rem 0;
  background: #064e3b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown[data-open="true"] .nav-dropdown-panel {
  display: block;
}
.nav-dropdown .nav-dropdown-panel a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #a7f3d0;
  white-space: nowrap;
}
.nav-dropdown .nav-dropdown-panel a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-dropdown-sub {
  padding-left: 1rem;
  border-left: 2px solid rgba(255,255,255,0.2);
  margin-top: 0.25rem;
}
.nav-dropdown-sub a {
  font-size: 0.8125rem;
  padding: 0.35rem 0.5rem !important;
}

/* CRM / Case detail: info rows and cards */
.will-info-row {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #fafaf9;
  border-radius: 0.5rem;
  border-left: 3px solid var(--sww-green);
  font-size: 0.875rem;
  line-height: 1.5;
  color: #44403c;
}
.will-info-row:last-child {
  margin-bottom: 0;
}
.contact-info-row {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: #fafaf9;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
}
.contact-info-row .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #78716c;
  margin-bottom: 0.25rem;
}
.contact-info-row .value {
  font-size: 0.9375rem;
  color: #1c1917;
}
.contact-connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #f5f5f4;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
}
.contact-note-card,
.contact-task-card {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: #fafaf9;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
  font-size: 0.9375rem;
}
.contact-task-card.done {
  opacity: 0.8;
}
.contact-task-card .due {
  font-size: 0.8125rem;
  color: #78716c;
  margin-top: 0.25rem;
}
.crm-contact-card,
.crm-case-card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.crm-contact-card:hover,
.crm-case-card:hover {
  border-color: #a7f3d0;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.08);
}
.case-header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}
.case-header-item {
  min-width: 0;
}
.case-header-item .label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78716c;
  margin-bottom: 0.25rem;
}
.case-header-item .value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1c1917;
}
.case-header-item .value a {
  color: #047857;
  font-weight: 500;
}
.case-header-item .value a:hover {
  color: #059669;
}

/* Add slide-out panel (from right) */
.add-slide-out-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.add-slide-out-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.add-slide-out {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 28rem;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.add-slide-out.open {
  transform: translateX(0);
}
.add-slide-out-header {
  flex-shrink: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e7e5e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafaf9;
}
.add-slide-out-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1c1917;
}
.add-slide-out-close {
  padding: 0.5rem;
  color: #78716c;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.375rem;
  line-height: 1;
}
.add-slide-out-close:hover {
  color: #1c1917;
  background: #e7e5e4;
}
.add-slide-out-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}
.add-slide-out-body label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #44403c;
  margin-bottom: 0.375rem;
}
.add-slide-out-body input,
.add-slide-out-body select,
.add-slide-out-body textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}
.add-slide-out-body input:focus,
.add-slide-out-body select:focus,
.add-slide-out-body textarea:focus {
  outline: none;
  border-color: var(--sww-green);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}
.add-slide-out-body textarea {
  min-height: 100px;
  resize: vertical;
}
.add-slide-out-footer {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e7e5e4;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  background: #fafaf9;
}
.add-slide-out-footer button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
}
.add-slide-out-footer .btn-cancel {
  background: #fff;
  border: 1px solid #d6d3d1;
  color: #44403c;
}
.add-slide-out-footer .btn-cancel:hover {
  background: #f5f5f4;
}
.add-slide-out-footer .btn-add {
  background: var(--sww-green);
  color: #fff;
  border: none;
}
.add-slide-out-footer .btn-add:hover {
  background: #059669;
}
