/* App Styles - 3-Step Process Interface */

/* Header logo styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 24px;
  width: auto;
  vertical-align: middle;
}

/* Section display toggle */
.section {
  display: none;
}
.section.active {
  display: block;
}

/* App container */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.app-header {
  text-align: center;
  margin-bottom: 2rem;
}

.app-header h1 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.app-header p {
  color: var(--text-secondary);
}

/* Progress Bar */
.progress-container {
  margin: 2rem 0 3rem;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
  max-width: 100%;
}

.progress-bar::before {
  content: '';
  background-color: #e0e0e0;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  z-index: 1;
}

.progress {
  background-color: var(--secondary-color);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 0%;
  z-index: 2;
  transition: 0.4s ease;
}

.step {
  background-color: white;
  color: #999;
  border-radius: 50%;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #e0e0e0;
  position: relative;
  z-index: 3;
  font-weight: bold;
  transition: 0.4s ease;
}

.step.active {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.step.complete {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  color: white;
}

.step-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.step-label {
  text-align: center;
  width: 33.333%;
  color: #999;
  font-weight: 500;
  transition: 0.4s ease;
}

.step-label.active {
  color: var(--secondary-color);
  font-weight: 600;
}

/* Step Content */
.step-content {
  display: none;
  margin-bottom: 2rem;
}

.step-content.active {
  display: block;
}

.step-content h2 {
  margin-bottom: 1rem;
  color: var(--text-color);
  font-size: 1.5rem;
}

.step-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Auth buttons and account status */
.auth-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.account-status {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: var(--border-radius);
  background-color: #f5f5f5;
  display: none;
}

.account-status.active {
  display: block;
}

/* Step Navigation */
.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn-prev, .btn-next, .btn-create, .btn-start-over {
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
  outline: none;
}

.btn-prev {
  background-color: #f0f0f0;
  color: var(--text-color);
}

.btn-prev:hover {
  background-color: #e0e0e0;
}

.btn-next, .btn-create {
  background-color: var(--secondary-color);
  color: white;
}

.btn-next:hover, .btn-create:hover {
  background-color: #3651c9;
}

.btn-next:disabled, .btn-create:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.btn-start-over {
  background-color: var(--facebook-color);
  color: white;
  margin: 0 auto;
  display: block;
}

.btn-start-over:hover {
  background-color: #1464d9;
}

/* Carousel Grid */
.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.carousel-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.carousel-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.carousel-item .carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-item:hover .carousel-overlay {
  opacity: 1;
}

.carousel-item.selected {
  border-color: var(--secondary-color);
}

.carousel-item.selected .carousel-overlay {
  opacity: 1;
  background-color: rgba(64, 93, 230, 0.3);
}

.carousel-item .carousel-select {
  color: white;
  background-color: var(--secondary-color);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Board Preview */
.board-preview {
  margin: 1.5rem 0;
}

.board-item {
  padding: 1rem;
  border-radius: var(--border-radius);
  background-color: #f5f5f5;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.board-item-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 1rem;
}

.board-item-details h3 {
  margin-bottom: 0.25rem;
}

.board-item-details p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid var(--secondary-color);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Creation Status */
.creation-status {
  margin: 1.5rem 0;
  display: none;
}

.creation-status.active {
  display: block;
}

.status-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  background-color: #f5f5f5;
  margin-bottom: 0.5rem;
}

.status-icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.status-text {
  flex-grow: 1;
}

.status-loading .status-icon {
  color: #ffa000;
}

.status-success .status-icon {
  color: #4caf50;
}

.status-error .status-icon {
  color: #f44336;
}

/* Completion View */
.completion-view {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  background-color: #4caf50;
  color: white;
  font-size: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.created-boards-list {
  margin: 1.5rem 0;
  text-align: left;
}

.created-board-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  background-color: #f5f5f5;
  margin-bottom: 0.5rem;
}

.created-board-icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  color: #4caf50;
}

/* Monitoring Status Container */
.monitoring-status-container {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .monitoring-status-container {
    grid-template-columns: 1fr 1fr;
  }
}

.status-panel, .latest-post-panel {
  background-color: #f5f5f5;
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.status-panel h3, .latest-post-panel h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
  font-size: 1.2rem;
}

.status-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: white;
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
}

.status-info .status-icon {
  color: var(--secondary-color);
}

.timing-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.post-preview {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-info {
  padding: 1rem;
}

.post-info h4 {
  margin-bottom: 0.5rem;
}

.post-info p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.view-board-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.view-board-link:hover {
  background-color: #cc001f;
}

.btn-done {
  background-color: var(--primary-color);
  color: white;
}

.btn-done:hover {
  background-color: #cc001f;
}

@media (max-width: 768px) {
  .post-preview {
    flex-direction: column;
  }
  
  .post-preview img {
    width: 100%;
    height: 160px;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 1.5rem;
  }
  
  .step-label {
    font-size: 0.9rem;
  }
  
  .carousel-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .carousel-item img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .auth-buttons {
    flex-direction: column;
  }
  
  .carousel-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .carousel-item img {
    height: 120px;
  }
  
  .board-item {
    flex-direction: column;
    text-align: center;
  }
  
  .board-item-img {
    margin-right: 0;
    margin-bottom: 0.75rem;
  }
}
