/**
 * caledon_contacts / css/contacts-page.css
 *
 * Fully self-contained modern contact directory. Every class is prefixed
 * cc-* (Caledon Contacts) so nothing here can collide with the theme's
 * global CSS or any other module's styles — this was the root cause of
 * every accordion bug in earlier iterations, so this version deliberately
 * shares nothing with .acc-hdr / .ckeditor-accordion / etc.
 *
 * Uses native <details>/<summary> for expand/collapse — no JS required,
 * no external library dependency, fully keyboard- and screen-reader-
 * accessible by default.
 */

.content-main-full {
  max-width: none;
  width: 100%;
}

.cc-directory {
  --cc-primary: var(--color-primary, #1c3f68);
  --cc-border: #e2e6ea;
  --cc-text-muted: #5a6470;
  font-family: inherit;
}

/*  Category group  */

.cc-group {
  margin-bottom: 32px;
}

.cc-group__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cc-primary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cc-primary);
}

.cc-group__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/*  Card  */

.cc-card {
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.cc-card[open],
.cc-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Remove the browser's default disclosure triangle so we can draw our own. */
.cc-card__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-weight: 600;
  color: #1a1a1a;
}
.cc-card__summary::-webkit-details-marker {
  display: none;
}

.cc-card__name {
  flex: 1 1 auto;
  min-width: 0;
}

.cc-card__subtitle {
  font-weight: 400;
  color: var(--cc-text-muted);
}

/*  Right-aligned quick actions: phone + chevron  */

.cc-card__quick-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cc-card__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cc-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.cc-card__phone:hover {
  text-decoration: underline;
}

.cc-icon {
  font-size: 0.9em;
  opacity: 0.75;
}

.cc-card__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--cc-text-muted);
  border-bottom: 2px solid var(--cc-text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.cc-card[open] .cc-card__chevron {
  transform: rotate(-135deg);
}

/*  Expanded body  */

.cc-card__body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--cc-border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 400;
  color: #2a2a2a;
}

.cc-card__body a.cc-card__link,
.cc-card__extra-phones a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cc-primary);
  text-decoration: none;
  width: fit-content;
}
.cc-card__body a.cc-card__link:hover,
.cc-card__extra-phones a:hover {
  text-decoration: underline;
}

.cc-card__address {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--cc-text-muted);
  text-decoration: none;
}
.cc-card__address:hover {
  text-decoration: underline;
  color: var(--cc-primary);
}

.cc-card__extra-phones {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/*  Responsive  */

@media (max-width: 560px) {
  .cc-card__summary {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .cc-card__quick-actions {
    width: 100%;
    justify-content: space-between;
  }
  .cc-group__title {
    font-size: 1.1rem;
  }
}
