/* Norman Theme - Panel Styles */

/* Panel Layer */
.panel-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 62;
  pointer-events: none;
}

.panel-layer.has-panel {
  pointer-events: all;
}

/* Base Panel */
.panel {
  position: absolute;
  background: var(--bg-secondary);
  backdrop-filter: var(--panel-backdrop);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Panel Positions */
.panel[data-pos="ml"] {
  top: 40px;
  bottom: 60px;
  left: 40px;
  width: 480px;
  max-width: calc(100vw - 80px);
}

.panel[data-pos="mr"] {
  top: 40px;
  bottom: 60px;
  right: 40px;
  width: 480px;
  max-width: calc(100vw - 80px);
}

.panel[data-pos="bc"] {
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 400px;
  max-width: calc(100vw - 80px);
  max-height: 60vh;
}

.panel[data-pos="bc"].active {
  transform: translateX(-50%) translateY(0);
}

/* Panel Container */
.ps {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Panel Header */
.ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ps-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ps-back {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
}

.ps-back:hover {
  color: var(--text-primary);
}

.ps-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ps-close:hover {
  background: rgba(242, 234, 217, 0.1);
  color: var(--text-primary);
}

/* Panel Body */
.ps-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Subscribe Tab */
.subscribe-tab {
  margin-left: auto;
  background: #e85d3a;
  color: white;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  white-space: nowrap;
}

.subscribe-tab:hover {
  background: #d74c2a;
  transform: translateY(-2px);
}

/* Hide subscribe tab for logged-in members */
body.gh-member .subscribe-tab {
  display: none;
}

/* Works Categories */
.works-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.works-cat {
  background: rgba(242, 234, 217, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.works-cat:hover {
  background: rgba(242, 234, 217, 0.1);
  transform: translateY(-2px);
}

.wc-icon {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wc-icon svg {
  width: 32px;
  height: 32px;
}

.wc-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.wc-count {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
}

/* Works Back Header */
.works-back-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.works-back-btn {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.works-back-btn:hover {
  color: var(--text-primary);
}

.works-back-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Book Shelf */
.book-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.book-item {
  background: rgba(242, 234, 217, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-item:hover {
  background: rgba(242, 234, 217, 0.1);
  transform: translateY(-2px);
}

.book-cover {
  width: 100%;
  height: 240px;
  background: var(--bg-primary);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 12px;
  text-align: center;
}

.book-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.book-year {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Content Lists */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.content-item:hover {
  padding-left: 8px;
}

.content-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.content-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.content-excerpt {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.content-meta {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Praise Items */
.praise-item {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.praise-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.p-book-tag {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.p-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.p-source {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
}

/* About Panel */
.about-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.about-bio {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a-link {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.a-link:hover {
  color: var(--text-primary);
}

/* Events Panel */
.event-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ev-date {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.ev-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.ev-location {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ev-link {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-block;
}

.ev-link:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* Event Detail (flip back) */
.ev-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ev-detail-date {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.ev-detail-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

.ev-detail-location {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--text-secondary);
}

.ev-detail-content {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.ev-detail-content p {
  margin-bottom: 1em;
}

.ev-detail-content a {
  color: var(--accent-primary);
}

/* Event Tags (stage badges) */
.event-tags {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 8;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.event-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(242, 234, 217, 0.12);
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.event-tag:hover {
  background: rgba(242, 234, 217, 0.14);
  border-color: var(--accent-primary);
  transform: translateX(2px);
}

.event-tag-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.event-tag-date {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
  white-space: nowrap;
}

.event-tag-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .event-tags {
    top: 12px;
    left: 12px;
  }

  .event-tag {
    padding: 5px 10px;
  }

  .event-tag-date {
    font-size: 8px;
  }

  .event-tag-title {
    font-size: 11px;
  }
}

/* Blog Panel */
.blog-thumb {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Links Panel */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.links-item {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.links-item:hover {
  background: rgba(242, 234, 217, 0.1);
  color: var(--text-primary);
}

/* Media Kit Panel */
.mediakit-content {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.6;
}

.mediakit-content h1,
.mediakit-content h2,
.mediakit-content h3 {
  margin-bottom: 16px;
}

.mediakit-content p {
  margin-bottom: 16px;
}

.mediakit-content a {
  color: var(--accent-primary);
  text-decoration: none;
}

.mediakit-content a:hover {
  text-decoration: underline;
}

/* Subscribe Form */
.sub-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sub-input {
  background: rgba(242, 234, 217, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.sub-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(242, 234, 217, 0.1);
}

.sub-input::placeholder {
  color: var(--text-tertiary);
}

.sub-submit {
  background: var(--button-color, var(--accent-primary));
  color: white;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-submit:hover {
  background: var(--accent-warm);
  transform: translateY(-2px);
}

.sub-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sub-status {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  text-align: center;
}

.sub-status-success {
  color: #5cb85c;
}

/* Responsive */
@media (max-width: 768px) {
  .panel[data-pos="ml"],
  .panel[data-pos="mr"] {
    left: 20px;
    right: 20px;
    width: auto;
  }
  
  .panel[data-pos="bc"] {
    width: calc(100vw - 40px);
  }
  
  .ps-head,
  .works-back-head {
    padding: 16px 20px;
  }
  
  .ps-body {
    padding: 20px;
  }
  
  .works-cats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .book-shelf {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .subscribe-tab {
    padding: 4px 8px;
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .panel[data-pos="ml"],
  .panel[data-pos="mr"] {
    left: 12px;
    right: 12px;
  }
  
  .panel[data-pos="bc"] {
    width: calc(100vw - 24px);
  }
  
  .ps-head,
  .works-back-head {
    padding: 12px 16px;
  }
  
  .ps-body {
    padding: 16px;
  }
  
  .works-cat {
    padding: 20px 12px;
  }
  
  .wc-icon {
    font-size: 24px;
  }
  .wc-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .book-shelf {
    grid-template-columns: 1fr;
  }
}
