/**
 * File: assets/sb-frontend.css
 * Function: Front-end styling for Speakers Bureau plugin
 */

/* Base layout */
.sb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Archive page specific styling */
.archive .sb-wrap,
.page .sb-wrap {
  padding: 0px 24px;
}
.sb-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}
.sb-muted { color: #57606a; }
.sb-edit-link {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1f6feb 0%, #0969da 100%);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
  cursor: pointer;
  white-space: nowrap;
}

.sb-edit-link:hover {
  background: linear-gradient(135deg, #0969da 0%, #0550ae 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.4);
  color: #fff !important;
}

.sb-edit-link:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

/* Search header */
.sb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.sb-search form { display: flex; gap: 8px; }
.sb-search input[type="search"] {
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  min-width: 260px;
}
.sb-search button {
  padding: 10px 14px;
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.sb-search button:hover { filter: brightness(0.95); }

/* Directory grid */
.sb-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .sb-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .sb-directory-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Directory cards */
.sb-card {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sb-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.15);
  transform: translateY(-4px);
  border-color: #d0d7de;
}

.sb-field-organization {
padding: -5px, 0;
}

/* Image container for square aspect ratio */
.sb-card > a {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f8fa 0%, #e6e8eb 100%);
}

/* Fallback for missing images */
.sb-card > a:not(:has(img))::before,
.sb-card > a:empty::before {
  content: "👤";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.3;
}

.sb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .3s ease;
}

.sb-card:hover img {
  transform: scale(1.05);
}

/* Card content */
.sb-card-title {
  margin: 0 0 8px 0;
  padding: 0px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.sb-card-title a {
  color: #000;
  text-decoration: none;
  display: block;
}

.sb-card-title a:hover {
  color: #1f6feb;
  text-decoration: none;
}

.sb-card-meta {
  padding: 0 16px;
  margin-bottom: 8px;
  color: #656d76;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sb-card-meta:last-child {
  padding-bottom: 16px;
  margin-bottom: 0;
}

/* Topics styling */
.sb-card-meta:first-of-type {
  color: #1f6feb;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pagination */
.sb-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.sb-pagination a,
.sb-pagination span {
  padding: 8px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  text-decoration: none;
  color: #24292f;
}
.sb-pagination .current {
  background: #1f6feb;
  color: #fff;
  border-color: #1f6feb;
}

/* Single speaker layout */
.sb-single {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(140,149,159,.15);
  padding: 24px;
}

.sb-single-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .sb-single-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.sb-single-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sb-single-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sb-single-bottom {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e6e8eb;
}

.sb-figure { display: flex; flex-direction: column; gap: 16px; }
.sb-profile-img {
  max-width: 250px;
  height: auto;
  border-radius: 12px;
  border: 1px solid #e6e8eb;
  background: #f6f8fa;
}
.sb-secondary img {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e6e8eb;
  background: #f6f8fa;
}

.sb-bio h1 { margin-top: 0; font-size: 1.75rem; }
.sb-section { margin-bottom: 28px; }
.sb-section h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
  color: #111;
}
.sb-content { line-height: 1.6; color: #333; }

/* Section styling */
.sb-section {
  margin-bottom: 24px;
}

.sb-section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: #111;
  border-bottom: 2px solid #e6e8eb;
  padding-bottom: 8px;
}

.sb-field {
  margin-bottom: 12px;
}

.sb-label {
  display: block;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.sb-value {
  color: #333;
  line-height: 1.5;
}

.sb-topic-image {
  max-width: 280px;
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e6e8eb;
  margin: 12px 0;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Details list */
.sb-details {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
}
.sb-details dt {
  font-weight: 600;
  color: #111;
}
.sb-details dd {
  margin: 0 0 12px 0;
  color: #333;
}

/* Forms (register/edit) */
.sb-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.sb-form label {
  font-weight: 600;
  margin-bottom: 4px;
  display: inline-block;
}
.sb-field { display: flex; flex-direction: column; }
.sb-field input[type="text"],
.sb-field input[type="email"],
.sb-field input[type="url"],
.sb-field input[type="tel"],
.sb-field input[type="number"],
.sb-field textarea,
.sb-field select {
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  width: 100%;
}
.sb-field textarea { min-height: 120px; }

/* Textarea content display styling */
.sb-field-content p {
  margin-bottom: 1em;
  line-height: 1.6;
}
.sb-field-content p:last-child {
  margin-bottom: 0;
}
.sb-upload {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sb-upload .button {
  padding: 8px 12px;
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.sb-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.sb-actions .button-primary {
  padding: 10px 14px;
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.sb-actions .button-secondary {
  padding: 10px 14px;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #24292f;
  border-radius: 8px;
  cursor: pointer;
}

/* End of file: assets/sb-frontend.css */
/* END OF FILE */
