
/* Styles specific to the library page */

/* Story card styles */
.story-card {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* prevents content spill during transition */
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.story-card.collapsing {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
}


.story-cover-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
}

.story-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-card-content {
  padding: 1rem;
}

.story-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--foreground);
}

.story-date {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.story-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.story-actions .action-group {
  display: flex;
  gap: 0.5rem; /* Adjust spacing between Share and Delete */
}

/* Empty library message */
#empty-library-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

/* Delete confirmation modal */
.modal-body {
  color: var(--foreground);
}

.bg-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.spinner {
  display: inline-flex;
  align-items: center;
  margin-left: 1rem;
}

.spinner.hidden {
  display: none;
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Optional: More modern look for the text */
.spinner .text-sm {
  font-size: 0.92rem;
  color: #555;
  margin-left: 0.5rem;
}

.modal-footer.loading {
  pointer-events: none;
  opacity: 0.7;
}


.story-cover-image.shimmer {
  position: relative;
  overflow: hidden;
  background-color: #eee;
}

.story-cover-image.shimmer img {
  visibility: hidden;
}

.story-cover-image.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150px;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, transparent 0%, #f0f0f0 50%, transparent 100%);
  animation: shimmer 1.8s infinite;
  z-index: 2;
}

@keyframes shimmer {
  0% { left: -150px; }
  100% { left: 100%; }
}


.loading-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #848484;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

hr {
  height: 1px;
  border:0.02px;
  background-color: lightgray
}
