/**
 * tertiary-autosave.css
 * 터셔리 폼 임시 저장 기능 스타일
 */

/* 임시 저장 상태바 */
.auto-save-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 24px;
  gap: 16px;
}

.save-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.save-status-right {
  display: flex;
  gap: 8px;
}

/* 저장 표시 */
.save-indicator {
  display: inline-block;
  padding: 4px 12px;
  background: #28a745;
  color: white;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

.save-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

/* 버튼 스타일 */
.btn-save-now,
.btn-clear-draft {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
}

.btn-save-now:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-clear-draft {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-clear-draft:hover {
  background: #dc3545;
  color: white;
}

/* 복원 배너 */
.restore-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  gap: 20px;
  flex-wrap: wrap;
}

.restore-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 250px;
}

.restore-content svg {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  stroke: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.restore-content strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.restore-content p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.restore-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.restore-actions button {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-restore {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-restore:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-new {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-new:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-delete {
  background: rgba(220, 53, 69, 0.9);
  color: white;
}

.btn-delete:hover {
  background: #dc3545;
}

/* 알림 표시 */
.autosave-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
  max-width: 350px;
  word-wrap: break-word;
}

.autosave-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.autosave-notification.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.autosave-notification.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.autosave-notification.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.autosave-notification.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  white-space: pre-line;
}

/* 반응형 */
@media (max-width: 768px) {
  .auto-save-status {
    flex-direction: column;
    align-items: stretch;
  }

  .save-status-right {
    justify-content: flex-end;
  }

  .restore-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .restore-content {
    flex-direction: column;
    text-align: center;
  }

  .restore-actions {
    justify-content: center;
  }

  .autosave-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
