/* Share & Embed Modal Styles */

.share-embed-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-embed-modal .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.share-embed-modal .modal-content {
  position: relative;
  z-index: 2;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Modal Header */
.share-embed-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #e2e8f0;
}

.share-embed-modal .modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
}

.share-embed-modal .modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #64748b;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.share-embed-modal .modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Modal Body */
.share-embed-modal .modal-body {
  padding: 32px;
}

.share-embed-modal .section {
  margin-bottom: 32px;
}

.share-embed-modal .section:last-child {
  margin-bottom: 0;
}

.share-embed-modal .section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e293b;
}

.share-embed-modal .section-description {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 20px;
}

/* Public Toggle */
.public-toggle-container {
  margin-bottom: 20px;
}

.public-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.public-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.public-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 56px;
  height: 32px;
  background: #cbd5e1;
  border-radius: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 4px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.public-toggle input[type="checkbox"]:checked + .toggle-slider {
  background: #3b82f6;
}

.public-toggle input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.toggle-label .icon {
  font-size: 1.5rem;
}

.toggle-label .text {
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
}

.toggle-description {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 12px;
  padding-left: 72px;
}

/* Save Button */
.save-access-btn {
  width: 100%;
  padding: 14px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-access-btn:hover {
  background: #2563eb;
}

.save-access-btn:active {
  transform: scale(0.98);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #1e293b;
  background: #f8fafc;
}

.tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

/* Tab Content */
.tab-content {
  display: none;
}

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

.tab-description {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 16px;
}

/* Code Block */
.code-block {
  position: relative;
  margin-bottom: 16px;
}

.code-input,
.code-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  color: #1e293b;
  background: #f8fafc;
  resize: none;
}

.code-input:focus,
.code-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
}

.code-textarea {
  min-height: 150px;
}

.btn-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 16px;
  background: white;
  color: #3b82f6;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
}

/* Preview Link */
.preview-link {
  display: flex;
  justify-content: flex-start;
}

.preview-link .btn-secondary {
  padding: 10px 20px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.preview-link .btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Embed Options */
.embed-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 8px;
}

.embed-option {
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  transition: all 0.2s ease;
}

.embed-option:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Widget Features */
.widget-features {
  padding: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  margin-top: 16px;
}

.widget-features h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #166534;
}

.widget-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-features li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #16a34a;
}

.widget-features li:last-child {
  margin-bottom: 0;
}

/* Modal Footer */
.share-embed-modal .modal-footer {
  padding: 20px 32px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.modal-close-btn {
  padding: 12px 24px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .share-embed-modal .modal-content {
    width: 95%;
  }

  .share-embed-modal .modal-header,
  .share-embed-modal .modal-body,
  .share-embed-modal .modal-footer {
    padding: 20px;
  }

  .embed-options {
    grid-template-columns: 1fr;
  }

  .toggle-description {
    padding-left: 0;
    margin-top: 8px;
  }
}

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

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

.share-embed-modal .modal-overlay {
  animation: fadeIn 0.2s ease;
}

.share-embed-modal .modal-content {
  animation: slideUp 0.3s ease;
}
