/* Firebase Dynamic Components Styles */

/* Authentication Styles */
.user-email {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-right: 1rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--color-background);
  border-radius: var(--border-radius);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal__body {
  padding: 1.5rem;
}

.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.error-message {
  color: var(--color-error);
  background: rgba(220, 38, 38, 0.1);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.toast--show {
  transform: translateX(0);
}

.toast--success {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.1);
}

.toast--error {
  border-color: var(--color-error);
  background: rgba(220, 38, 38, 0.1);
}

/* Blog Post Styles */
.loading-container, .error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}

.loading {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.post-article {
  max-width: 800px;
  margin: 0 auto;
}

.post-content {
  margin: 2rem 0;
}

.prose {
  line-height: 1.7;
  font-size: 1.125rem;
}

.prose h2 {
  margin: 2rem 0 1rem 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.prose h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.prose h4 {
  margin: 1.25rem 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.prose p {
  margin: 1rem 0;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-tags {
  margin-bottom: 2rem;
}

.post-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* Admin Panel Styles */
.access-denied {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.access-denied .card {
  text-align: center;
  max-width: 400px;
}

.admin-form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--color-background-alt);
  border-radius: var(--border-radius);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-field label {
  font-weight: 500;
  color: var(--color-text);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--color-background);
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.admin-field textarea {
  resize: vertical;
  min-height: 100px;
}

.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-post-admin {
  padding: 1.5rem;
}

.blog-post-admin__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.blog-post-admin__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.blog-post-admin__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Status Indicators */
.status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status--published,
.status--ok {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

.status--draft {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-warning);
}

.status--scheduled,
.status--warn {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-warning);
}

.status--paused {
  background: rgba(107, 114, 128, 0.1);
  color: var(--color-text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal {
    width: 95%;
    margin: 1rem;
  }
  
  .toast {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .blog-post-admin__header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .blog-post-admin__meta {
    align-items: flex-start;
  }
  
  .post-actions {
    flex-direction: column;
  }
  
  .admin-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* CSS Variables for Theme Support */
:root {
  --color-primary: #b63b33;
  --color-success: #22c55e;
  --color-warning: #fbbf24;
  --color-error: #dc2626;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-background: #ffffff;
  --color-background-alt: #f9fafb;
  --color-border: #e5e7eb;
  --border-radius: 0.5rem;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #f9fafb;
    --color-text-muted: #d1d5db;
    --color-background: #111827;
    --color-background-alt: #1f2937;
    --color-border: #374151;
  }
}
