/* Certificate Show Page Styles */

/* Hide bullets for the top-level certificate items */
.certificate-data > ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

/* Nested answer list should look like standard bullets */
.certificate-data .answer-list {
  list-style: disc;
  margin-left: 1.5em;
  padding-left: 0.5em;
}

.certificate-data a {
  color: black !important;
}

/* Two-column layout for summary (left) and content (right) */
.certificate-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 16px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.summary-sidebar {
  flex: 0 0 28%;
  max-width: 360px;
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* Section items in two columns */
.certificate-data .section-items {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  columns: 2;
  column-gap: 24px;
}

.certificate-data .section-items > li {
  break-inside: avoid;
  margin-bottom: 12px;
  padding-left: 0;
}

/* Title lighter than the answer */
.certificate-data h4.item-title {
  font-weight: 500;
  margin: 0 0 6px 0;
}

.certificate-data .answer,
.certificate-data .answer-list li {
  font-weight: 600;
}

@media (max-width: 900px) {
  .certificate-layout { 
    flex-direction: column; 
  }
  .summary-sidebar { 
    flex: 1 1 auto; 
    max-width: none; 
  }
  .certificate-data .section-items { 
    columns: 1; 
  }
}

.visually-hidden {
  display: none;
}

.certificate {
  border: 2px solid #333;
  padding: 18px;
  border-radius: 8px;
  background: #faf9f6;
  margin-bottom: 36px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 18px;
}

/* Watermark/diagonal lines when not published */
.certificate.watermarked { 
  position: relative; 
  overflow: hidden; 
}

.certificate.watermarked::after {
  content: '';
  position: absolute; 
  inset: 0;
  background: repeating-linear-gradient(45deg,
    rgba(0,0,0,0.04) 0 12px,
    rgba(0,0,0,0.00) 12px 24px);
  pointer-events: none; 
  z-index: 0;
}

.certificate.watermarked::before {
  content: attr(data-watermark);
  position: absolute; 
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: 72px; 
  font-weight: 800;
  color: rgba(0,0,0,0.08); 
  letter-spacing: 8px;
  text-transform: uppercase; 
  pointer-events: none; 
  z-index: 0;
  white-space: nowrap;
}

.certificate > * { 
  position: relative; 
  z-index: 1; 
}

.localle {
  color: white;
  background-color: var(--color-dark-blue);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}

.status {
  color: var(--color-dark-blue);
}

/* Certificate header layout */
.certificate-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.certificate-badge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 100px;
}

.certificate-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.certificate-level-name {
  font-weight: 600;
  font-size: 24px;
  color: #333;
  text-align: center;
}

.certificate-title {
  margin: 0 0 12px 0;
  font-size: 28px;
}

.certificate-meta {
  color: #666;
}

.certificate-divider {
  margin: 12px 0;
}

.certificate-description {
  margin: 6px 0;
  font-size: 18px;
}

.certificate-level-description {
  margin: 6px 0;
  color: #444;
}

/* State notification */
.certificate-state-notice {
  background: var(--color-dark-blue);
  color: white;
  padding: 12px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-align: center;
}

.certificate-state-notice strong {
  color: white;
}

/* Embed button */
.embed-button-container {
  text-align: center;
  margin: 24px 0;
}

/* Embed overlay */
.embed-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  overflow-y: auto;
}

.embed-modal {
  position: relative;
  max-width: 600px;
  margin: 40px auto;
  background: white;
  border-radius: 8px;
  padding: 24px;
}

.embed-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-light-grey);
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-dark-blue) !important;
}

.embed-title {
  margin-top: 0;
  color: var(--color-dark-blue);
}

.embed-section {
  margin-bottom: 32px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.embed-section:last-child {
  margin-bottom: 0;
}

.embed-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.embed-section-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.embed-section-title {
  margin: 0;
  font-size: 18px;
}

.embed-section-subtitle {
  margin: 4px 0 0 0;
  color: #666;
}

.embed-code-title {
  margin: 16px 0 8px 0;
}

.embed-code-container {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  overflow-x: auto;
}

.embed-copy-button {
  margin-top: 8px;
  background: #666;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.embed-copy-button.copied {
  background: #28a745;
}

/* Summary sidebar */
.summary-box {
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
}

.summary-box h3 {
  margin-top: 0;
}

.summary-list {
  list-style: none;
  padding-left: 0;
}

.summary-list li {
  margin-bottom: 8px;
}

.summary-list strong {
  display: block;
  margin-bottom: 4px;
}

.summary-list ul {
  margin: 4px 0;
  padding-left: 20px;
}

.summary-list a {
  color: var(--color-dark-blue);
  text-decoration: none;
}

.summary-list a:hover {
  text-decoration: underline;
}
