/**
 * QuoteShare Styles
 */

:root {
  --qs-primary: #2c2c2c;
  --qs-text: #1a1a1a;
  --qs-border: #e0e0e0;
  --qs-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Toolbar */
.quoteshare-toolbar {
  position: fixed;
  background: white;
  border: 1px solid var(--qs-border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--qs-shadow);
  display: flex;
  gap: 4px;
  z-index: 10000;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quoteshare-toolbar-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #f5f5f5;
  color: var(--qs-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 500;
}

.quoteshare-toolbar-btn:hover {
  background: #e8e8e8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.quoteshare-toolbar-btn:active {
  transform: scale(0.98);
}

.quoteshare-toolbar-generate {
  background: var(--qs-primary);
  color: white;
}

.quoteshare-toolbar-generate:hover {
  background: #1a1a1a;
}

.quoteshare-toolbar-cancel {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
}

.quoteshare-toolbar-cancel:hover {
  background: #f0f0f0;
  color: var(--qs-text);
}

/* Mobile Widget */
.quoteshare-mobile-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--qs-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.quoteshare-mobile-widget:active {
  transform: scale(0.95);
}

.quoteshare-mobile-widget:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.quoteshare-mobile-instruction {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--qs-primary);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Modal Overlay */
.quoteshare-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.quoteshare-modal {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quoteshare-modal h2 {
  margin: 0 0 24px 0;
  font-size: 24px;
  font-weight: 500;
  color: var(--qs-text);
}

.quoteshare-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  color: #666;
  transition: color 0.2s;
}

.quoteshare-modal-close:hover {
  color: var(--qs-text);
}

.quoteshare-bg-option {
  cursor: pointer;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  border: 2px solid;
  transition: all 0.2s;
  font-weight: 500;
}

.quoteshare-bg-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.quoteshare-modal-download,
.quoteshare-modal-cancel {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.quoteshare-modal-download {
  flex: 1;
  background: var(--qs-primary);
  color: white;
}

.quoteshare-modal-download:hover {
  background: #1a1a1a;
}

.quoteshare-modal-download:active {
  transform: scale(0.98);
}

.quoteshare-modal-cancel {
  background: #f0f0f0;
  color: var(--qs-text);
}

.quoteshare-modal-cancel:hover {
  background: #e0e0e0;
}

/* Scrollbar */
.quoteshare-modal::-webkit-scrollbar {
  width: 8px;
}

.quoteshare-modal::-webkit-scrollbar-track {
  background: transparent;
}

.quoteshare-modal::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.quoteshare-modal::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Responsive */
@media (max-width: 600px) {
  .quoteshare-modal {
    width: 95%;
    padding: 20px;
  }

  .quoteshare-modal h2 {
    font-size: 20px;
  }

  .quoteshare-toolbar {
    max-width: 90vw;
  }

  .quoteshare-mobile-widget {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px;
    font-size: 12px;
  }
}
