/* Reset and global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  transition: background 0.7s ease, color 0.7s ease;
}

    #frame-menu-btn {
 
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

#frame-menu-btn::after {
  content: '▼';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
}

/* Dropdown container initially hidden */
.dropdown-selector {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 220px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
}


/* App container */
#app {
  min-height: 100vh;
  width: 100%;
  /*background: linear-gradient(to bottom right, #f3f4f6, #eff6ff, #f3e8ff);*/
  color: #1f2937;
}

/* Dark mode styles */
#app.dark-mode {
  background: linear-gradient(to bottom right, #111827, #180f20, #1f2539);
  color: #ffffff;
}

/* Header */
/* header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
} */

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Theme toggle button */
#theme-toggle {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  background: linear-gradient(to right, #e5e7eb, #d1d5db);
  color: #1f2937;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
}

#app.dark-mode #theme-toggle {
  background: linear-gradient(to right, #4b5563, #374151);
  color: #ffffff;
}

#theme-toggle:hover {
  background: linear-gradient(to right, #d1d5db, #9ca3af);
  transform: translateY(-2px);
}

#app.dark-mode #theme-toggle:hover {
  background: linear-gradient(to right, #6b7280, #4b5563);
}

/* Filter buttons */
.filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  background: #e5e7eb;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
}

#app.dark-mode .filter-btn {
  background: #4b5563;
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(to right, #2563eb, #1e40af);
  color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.filter-btn:hover:not(.active) {
  background: #d1d5db;
  transform: translateY(-2px);
}

#app.dark-mode .filter-btn:hover:not(.active) {
  background: #6b7280;
}

/* Main content */
main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem;
}

@media (min-width: 768px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Color grid */
#color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 450px;
  overflow-y: auto;
  padding: 1rem;
  margin-top: 15px;
  /* border: #111827 2px solid; */
  margin-left: 60px;
}

/* Custom scrollbar styling */
#color-grid::-webkit-scrollbar {
  width: 8px;
}

#color-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#color-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#color-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.color-swatch {
  width: 7rem;
  height: 10rem;
  position: relative;
  cursor: pointer;
}

.color-swatch svg {
  width: 100%;
  height: 100%;
}

/* Tooltip for color name and code on hover */
.color-swatch:hover::after {
  content: attr(title) " (" attr(data-code) ")";
  position: absolute;
  top: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  /*white-space: nowrap;*/
  z-index: 10;
}

#app.dark-mode .color-swatch:hover::after {
  background: #d1d5db;
  color: #1f2937;
}

/* Preview box */
#preview-box {
  position: relative;
  min-height: 450px;
  width: 70%;
  height: 520px;
  margin: 0 auto;
  background: #C0C5DB;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease, opacity 0.5s ease;
  border: 2px solid black;
  border-bottom: none;
}

#preview-image {
  width: 100%;
  height: 100%;
}

#preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Preview details - now outside the preview box */
.preview-details {
  width: 70%;
  margin: 0 auto;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 0.75rem 0.75rem;
  border: 2px solid black;
  border-top: none;
  text-align: center;
}

#app.dark-mode .preview-details {
  background: rgba(0, 0, 0, 0.8);
}

#color-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
}

#app.dark-mode #color-name {
  color: #ffffff;
}

#color-code {
  font-size: 1.25rem;
  color: #4b5563;
  font-family: 'Roboto Mono', monospace;
}

#app.dark-mode #color-code {
  color: #d1d5db;
}

/* Button container */
.button-container {
  margin-top: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Copy and Frame buttons */
#copy-btn,
#frame-menu-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  /*background: linear-gradient(to right, #2563eb, #1e40af);*/
  /*color: #ffffff;*/
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  /*border: none;*/
  width: 100%;
  max-width: 300px;
}

#copy-btn:hover,
#frame-menu-btn:hover {
  /*background: linear-gradient(to right, #1e40af, #1e3a8a);*/
  transform: translateY(-2px);
}

/* Frame menu */
.frame-menu {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.dropdown-selector {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 20;
  width: 200px;
  display: none;
  padding: 0.5rem 0;
}

#app.dark-mode .dropdown-selector {
  background: #4b5563;
}

.dropdown-selector.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
  margin: 0.25rem 0.5rem;
}

#app.dark-mode .dropdown-item {
  color: #ffffff;
}

.dropdown-item::before {
  content: '🎨';
  margin-right: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.dropdown-item:hover {
  /*background: linear-gradient(to right, #e5e7eb, #d1d5db);*/
  color: #1f2937;
  transform: translateX(4px);
}

#app.dark-mode .dropdown-item:hover {
  background: linear-gradient(to right, #6b7280, #4b5563);
  color: #ffffff;
}

.dropdown-item:hover::before {
  opacity: 1;
}

/* Image status */
#image-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #10b981;
  display: none;
}

#image-status.show {
  display: block;
}

#image-status.green-text {
  color: #10b981;
}

#image-status.red-text {
  color: #ef4444;
}

/* Copy popup */
#copy-popup {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 30;
  display: none;
  animation: popup 2s ease-out;
}

#copy-popup.show {
  display: block;
}

@keyframes popup {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

/* Animation keyframes */
@keyframes fadeScale {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes colorShift {
  0% {
    filter: hue-rotate(0deg) brightness(0.8);
  }
  50% {
    filter: hue-rotate(15deg) brightness(1.1);
  }
  100% {
    filter: hue-rotate(0deg) brightness(1);
  }
}

@keyframes color-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.05); opacity: 1; }
}

@keyframes glow {
  0% { box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes sparkle {
  0% { transform: translateY(0); opacity: 0.5; }
  100% { transform: translateY(-10px); opacity: 0.9; }
}

.gradient-wipe {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--old-color), var(--new-color));
  animation: wipe 0.8s ease-out forwards;
}

@keyframes wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.color-pulse {
  animation: color-pulse 0.4s ease-out;
}

.glow-effect {
  animation: glow 1.5s ease-in-out infinite alternate;
}

.hidden {
  display: none;
}
/* Add this new style for the color info section */
.color-info {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#app.dark-mode .color-info {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

#color-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

#app.dark-mode #color-name {
  color: #ffffff;
}

#color-code {
  font-size: 1.1rem;
  color: #4b5563;
  font-family: 'Roboto Mono', monospace;
}

#app.dark-mode #color-code {
  color: #d1d5db;
}

/* Update the preview box to remove bottom details */
#preview-box {
  position: relative;
  min-height: 450px;
  width: 70%;
  height: 520px;
  margin: 0 auto;
  background: #C0C5DB;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease, opacity 0.5s ease;
  border: 2px solid black;
}

/* Update button container */
.button-container {
  width: 70%;
  margin: 1rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
/* Add these to your CSS */
#color-preview-container {
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#combined_preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: fill;
}

.modal-body {
    padding: 20px;
}

.card-header {
    font-weight: bold;
}

#color-display-box {
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

#interior_colour_swatch {
    border: 1px solid #dee2e6;
}
.whatsapp-btn {
    background-color: #25D366; /* WhatsApp green */
    border-color: #25D366;
}
.whatsapp-btn:hover {
    background-color: #128C7E; /* Darker green on hover */
    border-color: #128C7E;
}
