
.modal-backdrop {
  z-index: 1040 !important;
  pointer-events: none !important; 
}

#buyAdditionalModal.modal {
  z-index: 900 !important;
  pointer-events: auto !important; 
}

#buyAdditionalModal .modal-dialog {
  z-index: 1051 !important;
  pointer-events: auto !important;
}

#buyAdditionalModal .modal-content {
  position: relative;
  z-index: 900 !important;
  pointer-events: auto !important;
  background: white; 
}

/* Ensure modal backdrop only blocks clicks on the modal itself */
#buyAdditionalModal.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* License option cards */
.license-option.clickable {
  cursor: pointer;
  transition: all 0.2s;
  pointer-events: auto !important; /* Ensure cards are clickable */
}

.license-option.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ensure all form elements in modal are interactive */
#buyAdditionalModal input,
#buyAdditionalModal select,
#buyAdditionalModal button,
#buyAdditionalModal .form-check,
#buyAdditionalModal .form-select {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
}

/* Night mode support */
body.night-mode #buyAdditionalModal .modal-content {
  background: #2d3748;
}

/* Scrollable tabs wrapper */
.nav-tabs-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tabs-wrapper .nav-tabs {
  border-bottom: 1px solid #dee2e6;
  margin: 0;
  padding: 0 1rem;
}

/* Tab styling */
.nav-tabs .nav-item {
  flex-shrink: 0;
}

.nav-tabs .nav-link {
  color: #6c757d;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 14px 18px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: #495057;
  background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  background-color: transparent;
}

/* Hide tab text on small screens */
@media (max-width: 576px) {
  .nav-tabs .nav-link {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  
  .nav-tabs .nav-link i {
    margin-right: 0 !important;
  }
  
  .nav-tabs .nav-link span {
    display: none;
  }
}

/* Sticky sidebar */
@media (min-width: 992px) {
  .sidebar-sticky {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}

/* Comment styling */
.comment-item {
  padding: 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.comment-item:hover {
  background: #f8fafc;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

/* Rating stars */
.rating-stars {
  font-size: 2rem;
  cursor: pointer;
  display: inline-block;
}

.rating-star {
  color: #ddd;
  transition: color 0.2s ease;
  margin: 0 3px;
  cursor: pointer;
}

.rating-star:hover,
.rating-star.active {
  color: #ffc107;
}

/* Review items */
.review-item {
  transition: background-color 0.2s;
}

.review-item:hover {
  background-color: #f8f9fa;
  padding: 15px;
  margin: 0 -15px 1.5rem;
  border-radius: 8px;
}

/* Content styling */
.addon-description,
.addon-features {
  line-height: 1.8;
  font-size: 1.05rem;
}
/* Comment Reply Styles */
.comment-replies {
  margin-left: 60px;
  margin-top: 1rem;
  border-left: 3px solid #e2e8f0;
  padding-left: 1rem;
}

body.night-mode .comment-replies {
  border-left-color: #4a5568;
}

.comment-item {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.night-mode .comment-item {
  background: #2d3748;
}

.comment-reply {
  background: #f7fafc;
}

body.night-mode .comment-reply {
  background: #1a202c;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-meta {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

body.night-mode .comment-author {
  color: #e2e8f0;
}

.comment-date {
  font-size: 12px;
  color: #718096;
}

.comment-text {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

body.night-mode .comment-text {
  color: #cbd5e0;
}

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

.comment-actions button {
  background: none;
  border: none;
  color: #4299e1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.comment-actions button:hover {
  color: #2b6cb0;
}

.reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: #edf2f7;
  border-radius: 8px;
  display: none;
}

body.night-mode .reply-form {
  background: #1a202c;
}

.reply-form.active {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.reply-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  resize: vertical;
  min-height: 80px;
  font-size: 14px;
}

body.night-mode .reply-form textarea {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

.reply-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .comment-replies {
    margin-left: 30px;
    padding-left: 0.75rem;
  }
}
/* Delete Comment Button */
.comment-delete-btn {
  background: none;
  border: none;
  color: #e53e3e;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.comment-delete-btn:hover {
  color: #c53030;
}

.comment-delete-btn i {
  margin-right: 4px;
}

/* Delete Confirmation Modal */
.delete-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.delete-modal.active {
  display: flex;
}

.delete-modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

body.night-mode .delete-modal-content {
  background: #2d3748;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.delete-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.delete-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fed7d7;
  color: #e53e3e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

body.night-mode .delete-modal-icon {
  background: #742a2a;
  color: #fc8181;
}

.delete-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

body.night-mode .delete-modal-title {
  color: #e2e8f0;
}

.delete-modal-body {
  color: #718096;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

body.night-mode .delete-modal-body {
  color: #cbd5e0;
}

.delete-modal-warning {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  font-size: 14px;
  color: #742a2a;
}

body.night-mode .delete-modal-warning {
  background: #742a2a;
  color: #feb2b2;
}

.delete-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.delete-modal-actions button {
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete-confirm {
  background: #e53e3e;
  color: white;
}

.btn-delete-confirm:hover {
  background: #c53030;
  transform: translateY(-1px);
}

.btn-delete-cancel {
  background: #e2e8f0;
  color: #4a5568;
}

body.night-mode .btn-delete-cancel {
  background: #4a5568;
  color: #e2e8f0;
}

.btn-delete-cancel:hover {
  background: #cbd5e0;
}

body.night-mode .btn-delete-cancel:hover {
  background: #718096;
}

/* Admin Badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fbbf24;
  color: #78350f;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.comment-meta-flex {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* Tutorial Content Styling */
.tutorial-content {
  font-size: 15px;
  line-height: 1.8;
}

.tutorial-header h3 {
  color: #2d3748;
  font-weight: 600;
}

body.night-mode .tutorial-header h3 {
  color: #e2e8f0;
}

.tutorial-body {
  color: #4a5568;
}

body.night-mode .tutorial-body {
  color: #cbd5e0;
}

.tutorial-body h1,
.tutorial-body h2,
.tutorial-body h3,
.tutorial-body h4,
.tutorial-body h5,
.tutorial-body h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #2d3748;
}

body.night-mode .tutorial-body h1,
body.night-mode .tutorial-body h2,
body.night-mode .tutorial-body h3,
body.night-mode .tutorial-body h4,
body.night-mode .tutorial-body h5,
body.night-mode .tutorial-body h6 {
  color: #e2e8f0;
}

.tutorial-body h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.tutorial-body h3 {
  font-size: 1.25rem;
}

.tutorial-body p {
  margin-bottom: 1rem;
}

.tutorial-body ul,
.tutorial-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.tutorial-body li {
  margin-bottom: 0.5rem;
}

.tutorial-body pre {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

body.night-mode .tutorial-body pre {
  background: #1a202c;
  border-color: #4a5568;
}

.tutorial-body code {
  background: #edf2f7;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #c53030;
}

body.night-mode .tutorial-body code {
  background: #2d3748;
  color: #fc8181;
}

.tutorial-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.tutorial-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tutorial-body blockquote {
  border-left: 4px solid #4299e1;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #718096;
  font-style: italic;
}

body.night-mode .tutorial-body blockquote {
  border-left-color: #63b3ed;
  color: #a0aec0;
}

.tutorial-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.tutorial-body table th,
.tutorial-body table td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  text-align: left;
}

body.night-mode .tutorial-body table th,
body.night-mode .tutorial-body table td {
  border-color: #4a5568;
}

.tutorial-body table th {
  background: #f7fafc;
  font-weight: 600;
}

body.night-mode .tutorial-body table th {
  background: #2d3748;
}

.tutorial-body a {
  color: #4299e1;
  text-decoration: none;
}

.tutorial-body a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}

.tutorial-footer {
  margin-top: 2rem;
}
/* Codebox toolbar (copy button) */
.tutorial-body pre {
  position: relative;
  padding-top: 2.6rem; /* space for button */
}

.tutorial-body .codebox-copy-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 5;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #2d3748;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  opacity: .95;
}

.tutorial-body pre:hover .codebox-copy-btn { opacity: 1; }

body.night-mode .tutorial-body .codebox-copy-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}
/* FORCE Prism blocks to be dark */
.tutorial-body pre,
.tutorial-body pre[class*="language-"]{
  background: #0b0f14 !important;
  border: 1px solid #1f2a37 !important;
  border-radius: 12px !important;
  padding: 2.8rem 1rem 1rem !important;
  overflow: auto !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.18) !important;
}

/* Inline code stays readable */
.tutorial-body :not(pre) > code{
  color: #e5e7eb !important;
}

/* Code blocks: let Prism control token colors */
.tutorial-body pre code,
.tutorial-body pre code[class*="language-"]{
  color: inherit !important;
}

/* If your theme adds a white background */
.tutorial-body pre code { background-color: transparent !important; }

/* Prism line numbers / misc sometimes fade text */
.tutorial-body pre[class*="language-"] * { opacity: 1 !important; }

/* Optional: make inline code dark too */
.tutorial-body :not(pre) > code{
  background: #111827 !important;
  border: 1px solid #1f2a37 !important;
  color: #e5e7eb !important;
  border-radius: 6px !important;
  padding: .15rem .35rem !important;
}
