/* ============================================================================
   ORGANIZATION WELCOME PAGE STYLES
   ============================================================================ */

.organization-welcome-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Multi-Organization Welcome Styles */
.multi-org-welcome-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.multi-org-welcome-header {
  text-align: center;
  margin-bottom: 20px;
}

.multi-org-welcome-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 10px 0;
}

.multi-org-welcome-header p {
  font-size: 1.1rem;
  color: var(--text2, rgba(255, 255, 255, 0.7));
  margin: 0;
}

.org-welcome-section {
  background: var(--containerbackground, rgba(255, 255, 255, 0.05));
  border-radius: 12px;
  padding: 30px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  
  /* Ensure theme colors are inherited within this section */
  color: var(--text-color, #fff);
}

.org-welcome-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.org-welcome-section > * {
  position: relative;
  z-index: 1;
}

.org-welcome-section:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color, #3498db);
}

.org-welcome-section:hover::before {
  opacity: 0.9;
}

/* Ensure book cards inherit theme colors */
.org-welcome-section .org-book-card {
  background: var(--bg-secondary, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-color, #fff);
}

.org-welcome-section .org-book-card:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.12));
  border-color: var(--accent-color, #3498db);
}

.org-welcome-section .org-book-title {
  color: var(--text-color, #fff);
}

.org-welcome-section .org-book-description {
  color: var(--text2, rgba(255, 255, 255, 0.7));
}

.org-welcome-section h1,
.org-welcome-section h2,
.org-welcome-section h3 {
  color: var(--text-color, #fff);
}

.org-welcome-section .new-book-card {
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
  border: 2px dashed var(--accent-color, #3498db);
}

.org-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Organization Logo */
.org-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.org-logo {
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
}

/* Organization Name */
.org-name {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-color);
  margin: 0 0 20px 0;
}

/* Organization Description */
.org-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 20px;
  background: var(--containerbackground, rgba(255, 255, 255, 0.7));
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.org-description p {
  /* font-size: 1.1rem; */
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
}

/* Books Section */
.org-books-section {
  width: 100%;
}

.org-books-section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: var(--text-color);
  text-align: center;
}

.org-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.org-book-card {
  background: var(--containerbackground, rgba(255, 255, 255, 0.9));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.org-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

/* Edit Button */
.org-book-edit-btn {
  position: absolute;
  top: 12px;
  right: 52px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--containerbackground, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.org-book-edit-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.org-book-edit-btn svg {
  width: 14px;
  height: 14px;
}

/* Content Generator Button */
.org-book-content-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--containerbackground, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.org-book-content-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.org-book-content-btn svg {
  width: 14px;
  height: 14px;
}

/* New Book Card */
.new-book-card {
  border: 2px dashed var(--border-color);
  background: var(--containerbackground, rgba(255, 255, 255, 0.5));
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 260px;
}

.new-book-card:hover {
  border-color: var(--accent-color);
  background: var(--containerbackground, rgba(255, 255, 255, 0.8));
}

.new-book-icon {
  font-size: 4rem;
  font-weight: 300;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.new-book-card:hover .new-book-icon {
  transform: scale(1.1);
}

.new-book-card .org-book-title {
  color: var(--accent-color);
}

.new-book-card .org-book-description {
  color: var(--text-color-secondary, #666);
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

.org-book-cover {
  /* width: 100%; */
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  /* background: var(--bg-color, #f5f5f5); */
}

.org-book-cover-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color-light, #667eea));
  color: white;
  font-size: 4rem;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
}

.org-book-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.org-book-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
}

.org-book-description {
  /* font-size: 0.95rem; */
  line-height: 1.5;
  color: var(--text-color-secondary, #666);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Organization label for books from other orgs */
.org-book-org-label {
  font-size: 0.75rem;
  color: var(--accent-color, #3498db);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
  padding: 0;
  display: inline-block;
  width: fit-content;
  opacity: 0.9;
}

/* Other Organizations Section */
.other-orgs-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.other-orgs-section h2 {
  color: var(--text2, rgba(255, 255, 255, 0.8));
}

.no-books-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color-secondary, #666);
  font-size: 1.1rem;
}

/* Organization Stats */
.org-stats {
  text-align: center;
  padding: 30px 20px;
  background: var(--containerbackground, rgba(255, 255, 255, 0.7));
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 20px;
}

.org-stats p {
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0;
}

.org-stats strong {
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .organization-welcome-container {
    padding: 20px 15px;
  }

  .org-name {
    font-size: 2rem;
  }

  .org-description p {
    font-size: 1rem;
  }

  .org-books-section h2 {
    font-size: 1.5rem;
  }

  .org-books-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .org-book-cover,
  .org-book-cover-placeholder {
    height: 160px;
  }

  .org-logo {
    max-width: 150px;
    max-height: 90px;
  }
}

@media (max-width: 480px) {
  .org-name {
    font-size: 1.75rem;
  }

  .org-book-title {
    font-size: 1.1rem;
  }

  .org-book-description {
    font-size: 0.9rem;
  }
}
