/* Estilos para el plugin Colores Hexadecimales */

.colores-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  padding: 20px 0;
}

.colores-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.colores-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 20px;
  text-align: center;
}

.colores-header h2 {
  font-size: 1.8rem;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.colores-header p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0;
}

.colores-controls {
  background: white;
  padding: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
}

.colores-search-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.colores-search-input {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.95rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.colores-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.colores-search-input::placeholder {
  color: #999;
}

.colores-filter-info {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
}

.colores-btn {
  padding: 10px 20px;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.colores-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.colores-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.colores-btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 2px solid #ddd;
}

.colores-btn-secondary:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.colores-palette-container {
  padding: 20px;
  min-height: 300px;
  max-height: 600px;
  overflow-y: auto;
}

.colores-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  width: 100%;
}

.colores-color-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.colores-color-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.colores-color-cell:active {
  transform: scale(0.98);
}

.colores-footer {
  background: #f9f9f9;
  padding: 15px 20px;
  text-align: center;
  border-top: 1px solid #eee;
}

.colores-status-message {
  font-size: 0.95rem;
  color: #667eea;
  font-weight: 600;
  min-height: 20px;
  animation: colores-fadeIn 0.3s ease;
}

@keyframes colores-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal */
.colores-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation: colores-fadeIn 0.3s ease;
}

.colores-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.colores-modal-content h3 {
  margin-top: 0;
  color: #333;
}

.colores-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.colores-close:hover,
.colores-close:focus {
  color: #000;
}

.colores-proposals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 20px;
  clear: both;
}

.colores-proposal-color {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  position: relative;
  padding: 8px;
  text-align: center;
}

.colores-proposal-color:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .colores-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .colores-header h2 {
    font-size: 1.3rem;
  }

  .colores-controls {
    flex-direction: column;
  }

  .colores-search-container {
    width: 100%;
    max-width: 100%;
  }

  .colores-modal-content {
    width: 95%;
    margin-top: 20%;
    padding: 20px;
  }
}

/* Estilos específicos para el admin de WordPress */
.wrap .colores-container {
  background: transparent;
  padding: 0;
}

.wrap .colores-wrapper {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
