/* Builder Workspace CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: #090b11;
  color: #f3f4f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f121d;
}
::-webkit-scrollbar-thumb {
  background: #272e48;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e4b75;
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
  height: calc(100vh - 64px);
  flex: 1;
}

/* Top Header Styling */
.app-header {
  height: 64px;
  background-color: #0f121d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  z-index: 100;
}

.header-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-container .editor-logo-icon {
  font-size: 22px;
  color: #ec4899;
}

.header-logo-container .editor-logo {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(to right, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  gap: 16px;
}

.btn-nav {
  background: transparent;
  border: 1px solid transparent;
  color: #9ca3af;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-nav:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.btn-nav.active {
  color: #fff;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.2);
}

/* Left panel - Editor */
.editor-panel {
  width: 50%;
  min-width: 500px;
  max-width: 700px;
  height: 100%;
  background-color: #0f121d;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.editor-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(to right, #0f121d, #141927);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-panel-title i {
  color: #a855f7;
}

.edit-badge {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #facc15;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.editor-logo-icon {
  font-size: 22px;
  color: #ec4899;
}

.editor-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
}

/* Editor Sections */
.editor-section {
  background: #141927;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.section-title i {
  color: #a855f7;
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #9ca3af;
}

input[type="text"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

/* Upload Style */
.upload-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.upload-preview-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #0f121d;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-wrapper i {
  font-size: 24px;
  color: #4b5563;
}

.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn-upload-trigger {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-upload-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-info {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

.remove-avatar-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  transition: opacity 0.2s;
}

.remove-avatar-btn:hover {
  text-decoration: underline;
}

/* Dynamic Buttons Manager */
.buttons-manager {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.buttons-list-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.button-item-editor {
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.3s ease;
}

.button-item-editor:hover {
  border-color: rgba(168, 85, 247, 0.3);
}

.button-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.button-editor-row.full {
  grid-template-columns: 1fr;
}

.button-editor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  margin-top: 12px;
}

.button-custom-color-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9ca3af;
  cursor: pointer;
}

.button-custom-color-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.color-picker::-webkit-color-swatch {
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.button-control-btns {
  display: flex;
  gap: 8px;
}

.btn-ctrl {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #9ca3af;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-ctrl.btn-delete {
  color: #f87171;
}

.btn-ctrl.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Add Button Trigger */
.btn-add-button {
  background: linear-gradient(to right, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px dashed rgba(168, 85, 247, 0.4);
  color: #a855f7;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-add-button:hover {
  background: linear-gradient(to right, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border-style: solid;
  transform: translateY(-1px);
}

/* Theme Presets Grid */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-card {
  background: #0f121d;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.theme-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-card.active {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}

.theme-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.theme-card-preview {
  height: 24px;
  border-radius: 4px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #1a2035;
}

.theme-card-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.theme-card.active .theme-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #a855f7;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Right panel - Preview Container */
.preview-panel {
  flex: 1;
  background: radial-gradient(circle at center, #1b1f38 0%, #090b11 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
}

/* Mobile Frame Mockup */
.phone-mockup {
  width: 375px;
  height: 760px;
  background-color: #000;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 4px #2c2e3a;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Notch/Dynamic Island */
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background-color: #000;
  border-radius: 18px;
  z-index: 999;
}

.phone-screen {
  flex: 1;
  border-radius: 38px;
  overflow: hidden;
  background-color: #0b0f19;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Preview tag badge */
.preview-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
}

.preview-badge-dot {
  width: 6px;
  height: 6px;
  background: #a855f7;
  border-radius: 50%;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Main Publish Action Footer */
.editor-footer {
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #0f121d;
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 16px;
}

.btn-publish {
  flex: 1;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -3px rgba(168, 85, 247, 0.4);
  filter: brightness(1.05);
}

.btn-publish:active {
  transform: translateY(0);
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090b11; /* fully opaque background to hide behind section */
  z-index: 1000;
  display: none;
  overflow-y: auto; /* enable vertical scrolling */
  padding: 24px 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: block; /* use block for natural overflow scroll */
  opacity: 1;
}

.modal-content {
  background: #141927;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 480px;
  padding: 28px 20px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 10px auto 40px auto; /* center horizontally, margin at bottom for scroll breathing room */
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 2px solid #a855f7;
  color: #a855f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px auto;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.modal-desc {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 24px;
  line-height: 1.5;
}

.link-copy-container {
  display: flex;
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.generated-link-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 14px 16px;
  font-size: 14px;
  font-family: monospace;
  outline: none;
}

.btn-copy {
  background: #272e48;
  border: none;
  color: #fff;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy:hover {
  background: #3e4b75;
}

.modal-action-btns {
  display: flex;
  gap: 12px;
}

.btn-modal {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.btn-modal-primary {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  border: none;
}

.btn-modal-primary:hover {
  filter: brightness(1.05);
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border-left-color: #fff;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsiveness for Builder */
@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }
  .app-container {
    flex-direction: column;
    height: auto;
    width: 100%;
    overflow-x: hidden;
  }
  .editor-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .preview-panel {
    padding: 40px 16px;
    min-height: 800px;
    width: 100%;
    overflow-x: hidden;
  }

  /* Header mobile layouts stacking */
  .app-header {
    height: auto;
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
  }

  .header-logo-container {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-promo-banner {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    padding: 8px 12px;
  }

  .header-nav {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .btn-nav {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* Scaling down preview mockup for very small screens */
@media (max-width: 400px) {
  .phone-mockup {
    transform: scale(0.9);
    transform-origin: top center;
  }
  .preview-panel {
    min-height: 700px;
  }
}

/* My Sites Modal Styles */
.my-site-card-item {
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.my-site-card-item:hover {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.02);
}

.my-site-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.my-site-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-site-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-site-date {
  font-size: 11px;
  color: #6b7280;
}

.my-site-url-link {
  font-size: 13px;
  color: #a855f7;
  text-decoration: none;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.my-site-url-link:hover {
  text-decoration: underline;
  color: #c084fc;
}

.my-site-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-site-action {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-site-action:hover {
  background: #334155;
  color: #fff;
}

.btn-site-action.btn-site-edit {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.btn-site-action.btn-site-edit:hover {
  background: #a855f7;
  color: #fff;
}

.my-sites-empty {
  text-align: center;
  padding: 32px 16px;
  color: #6b7280;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.my-sites-empty i {
  font-size: 32px;
  color: #374151;
}

/* Card Status Badges */
.my-site-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.my-site-status-trial {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.my-site-status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.my-site-status-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.my-site-status-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Pay / Activate Button */
.btn-site-action.btn-site-pay {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.btn-site-action.btn-site-pay:hover {
  background: #22c55e;
  color: #fff;
}

/* Header Promo Banner */
.header-promo-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse-border 2s infinite alternate;
}

.header-promo-banner:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
  border-style: solid;
  transform: translateY(-1px);
}

.header-promo-banner i {
  color: #c084fc;
}

@keyframes pulse-border {
  0% { border-color: rgba(168, 85, 247, 0.4); }
  100% { border-color: rgba(236, 72, 153, 0.8); }
}

/* Gallery Upload Grid (Editor Panel) */
.gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.gallery-upload-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f121d;
}

.gallery-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-upload-item .gallery-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.gallery-upload-item:hover .gallery-remove-btn {
  opacity: 1;
}

.gallery-upload-add {
  aspect-ratio: 1 / 1;
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  background: rgba(168, 85, 247, 0.03);
  color: #a855f7;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.gallery-upload-add i {
  font-size: 20px;
}

.gallery-upload-add:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.5);
  border-style: solid;
}

.gallery-count-badge {
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
}

/* ========================================================
   MAP SELECTOR MODAL STYLING
   ======================================================== */
#map-selector-modal .modal-content {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}


/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
