/* Add this CSS for the help icon tooltip styling */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #666;
  color: white;
  font-size: 12px;
  margin-left: 6px;
  cursor: help;
  transition: background-color 0.2s ease;
}

.help-icon:hover {
  background-color: #444;
}

/* Transparency grid pattern */
.transparency-grid,
.transparency-container .js-image-container {
  position: relative;
  background-color: transparent;
  overflow: hidden;
  border-radius: 4px;
}

.transparency-grid::before,
.transparency-container .js-image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(-45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d0d0d0 75%),
    linear-gradient(-45deg, transparent 75%, #d0d0d0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #f5f5f5;
  pointer-events: none; /* Ensures clicks pass through to underlying elements */
  z-index: -1; /* Behind the content */
}

/* Transparency container styling */
.transparency-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

/* Image container styles */
.js-image-container {
  position: relative;
  width: 256px;
  height: 256px;
  margin: 0 auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Ensure transparency works */
.js-image-container img {
  background-color: transparent !important;
}

/* Edit button styles removed */
.image-edit-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Modal styles for component dialog */
.modal {
  display: block !important;
  position: fixed !important;
  z-index: 9999 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto !important;
  background-color: rgba(0,0,0,0.7) !important;
}

/* Modal content styles */
.modal-content {
  background-color: #2c2c2c !important;
  margin: 50px auto !important;
  padding: 20px !important;
  border-radius: 8px !important;
  width: 90% !important;
  max-width: 800px !important;
  position: relative !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5) !important;
}

/* Edit modal overrides */
#editModal {
  z-index: 9990 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#editModal.hidden {
  display: none !important;
}

/* Quota display */
.quota-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 100px;
  text-align: center;
}

.quota-count {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.quota-label {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

.quota-progress-bar {
  height: 4px;
  background-color: #6200ee;
  border-radius: 2px;
  margin-top: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

.quota-warning .quota-count {
  color: #e53935;
}

.quota-warning .quota-progress-bar {
  background-color: #e53935;
}

/* Admin badge styling */
.admin-badge {
  display: inline-block;
  background-color: #6200ee;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* Subscription plans in quota exceeded modal */
.quota-modal {
  max-width: 600px;
}

.quota-message {
  margin-bottom: 20px;
  text-align: center;
}

.quota-progress {
  width: 100%;
  height: 8px;
  background-color: #444;
  border-radius: 4px;
  margin: 12px 0;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #e53935;
  border-radius: 4px;
}

.progress-text {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 4px;
  text-align: right;
}

.subscription-options {
  margin: 20px 0;
}

.plan-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
}

.plan-card {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.plan-card.current {
  border: 2px solid #6200ee;
  box-shadow: 0 0 10px rgba(98, 0, 238, 0.3);
}

.plan-card h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.plan-card .price {
  font-weight: bold;
  margin-bottom: 5px;
  color: #6200ee;
}

.plan-card .quota {
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: #aaa;
}

.plan-card ul {
  text-align: left;
  padding-left: 20px;
  margin-bottom: 15px;
}

.plan-card li {
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.plan-card button {
  width: 100%;
  padding: 8px;
  background-color: #6200ee;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.plan-card button:hover:not([disabled]) {
  background-color: #7722ff;
}

.plan-card button[disabled] {
  background-color: #444;
  cursor: not-allowed;
}

.quota-footer {
  margin-top: 20px;
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
}

.secondary-button {
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s;
}

.secondary-button:hover {
  background-color: #555;
}

/* Mojang disclaimer footer */
.mojang-disclaimer {
  width: 100%;
  padding: 15px;
  background-color: #222;
  color: #aaa;
  text-align: center;
  font-size: 0.8rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid #444;
  z-index: 100;
}

.mojang-disclaimer p {
  margin: 0;
  line-height: 1.4;
}

.mojang-disclaimer a {
  color: #6200ee;
  text-decoration: none;
}

.mojang-disclaimer a:hover {
  text-decoration: underline;
}

/* Add padding to main content to account for fixed footer */
body {
  min-height: 100vh;
  padding-bottom: 70px; /* Adjusted to ensure footer is visible */
  box-sizing: border-box;
  position: relative;
}

/* Tool buttons in editor */
#editToolbar button,
#editActionToolbar button {
  cursor: pointer;
  padding: 8px;
  margin: 4px;
  border: 1px solid #444;
  background-color: #333;
  color: white;
  border-radius: 4px;
}

#editToolbar button:hover,
#editActionToolbar button:hover {
  background-color: #444;
}