/* Modern Logo Button Styles */
.modern-logo-button {
  --black-700: hsla(220, 60%, 20%, 1);  /* Changed to dark blue base */
  --border_radius: 24px;
  --transtion: 0.3s ease-in-out;
  --offset: 1px;

  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transform-origin: center;
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  border: none;
  border-radius: var(--border_radius);
  transform: scale(calc(1 + (var(--active, 0) * 0.05)));
  transition: transform var(--transtion);
  width: auto;
  min-width: 160px;
  justify-content: center;
  margin: 8px 0;
  font-size: 0.9rem;
}

.modern-logo-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);  /* Theme gradient */
  border-radius: var(--border_radius);
  box-shadow: inset 0 0.5px rgba(255, 255, 255, 0.4), 
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.2),
    0px 3px 8px -4px rgba(30, 64, 175, 0.3),
    0 0 0 calc(var(--active, 0) * 0.25rem) rgba(59, 130, 246, 0.5);  /* Theme color glow */
  transition: all var(--transtion);
  z-index: 0;
}

.modern-logo-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0891b2 100%);  /* Darker theme gradient for hover */
  background-image: radial-gradient(
      at 51% 89%,
      rgba(59, 130, 246, 0.6) 0px,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.6) 0px, transparent 50%),
    radial-gradient(at 22% 91%, rgba(30, 64, 175, 0.6) 0px, transparent 50%);
  background-position: top;
  opacity: var(--active, 0);
  border-radius: var(--border_radius);
  transition: opacity var(--transtion);
  z-index: 2;
}

.modern-logo-button:is(:hover, :focus-visible) {
  --active: 1;
}

.modern-logo-button:active {
  transform: scale(0.98);
}

.modern-logo-button .dots_border {
  --size_border: calc(100% + 1px);
  overflow: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--size_border);
  height: var(--size_border);
  background-color: transparent;
  border-radius: var(--border_radius);
  z-index: -10;
}

.modern-logo-button .dots_border::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: left;
  transform: rotate(0deg);
  width: 100%;
  height: 1.5rem;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.2)
  );  /* Softer gradient for dots */
  mask: linear-gradient(transparent 0%, white 120%);
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.modern-logo-button .sparkle {
  position: relative;
  z-index: 10;
  width: 1.25rem;
}

.modern-logo-button .sparkle .path {
  fill: currentColor;
  stroke: currentColor;
  transform-origin: center;
  color: hsl(0, 0%, 100%);
  opacity: 0.95;  /* Slightly softer white */
}

.modern-logo-button:is(:hover, :focus) .sparkle .path {
  animation: path 1.5s linear 0.5s infinite;
}

.modern-logo-button .sparkle .path:nth-child(1) {
  --scale_path_1: 1.15;
}

@keyframes path {
  0%,
  34%,
  71%,
  100% {
    transform: scale(1);
  }
  17% {
    transform: scale(var(--scale_path_1, 1));
  }
  49% {
    transform: scale(var(--scale_path_2, 1));
  }
  83% {
    transform: scale(var(--scale_path_3, 1));
  }
}

.modern-logo-button .text_button {
  position: relative;
  z-index: 10;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, var(--active, 0.85)) 120%
  );  /* Softer white text */
  background-clip: text;
  font-size: 0.9rem;
  color: transparent;
  -webkit-background-clip: text;
  font-weight: 500;  /* Added for better visibility */
  letter-spacing: 0.01em;  /* Added for better readability */
}

/* Hide the old logo toggle switch in desktop view */
@media (min-width: 768px) {
  .logo-toggle-switch {
    display: none;
  }
} 

/* Desktop Logo Modal Styles */
.desktop-logo-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1050;
  overflow: hidden;
}

.desktop-logo-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.desktop-logo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  color: white;
}

.desktop-logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.desktop-logo-title i {
  font-size: 1.5rem;
}

.desktop-logo-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.desktop-logo-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.desktop-logo-body {
  padding: 24px;
  max-height: calc(90vh - 180px);
  overflow-y: auto;
}

.logo-section {
  margin-bottom: 24px;
}

.logo-section:last-child {
  margin-bottom: 0;
}

.logo-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.preset-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.logo-option {
  position: relative;
  background: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.logo-option:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

.logo-option.active {
  background: #dbeafe;
  border-color: #3b82f6;
}

.logo-preview {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo-preview i {
  font-size: 24px;
}

.logo-preview.no-logo {
  background: #e5e7eb;
}

.logo-preview.no-logo i {
  color: #9ca3af;
}

.logo-name {
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
  font-weight: 500;
}

.custom-logo-upload {
  margin-top: 16px;
}

.custom-logo-btn {
  width: 100%;
  padding: 5px;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #4b5563;
  font-weight: 500;
}

.custom-logo-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.desktop-logo-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.desktop-logo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.desktop-logo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.desktop-logo-btn i {
  font-size: 1rem;
}

.desktop-logo-btn.secondary {
  background: #f3f4f6;
  color: #4b5563;
}

.desktop-logo-btn.secondary:hover {
  background: #e5e7eb;
}

.desktop-logo-btn.primary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  color: white;
}

.desktop-logo-btn.primary:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0891b2 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.desktop-logo-btn.danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
  width: 100%;
}

.desktop-logo-btn.danger:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.desktop-logo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1040;
}

.desktop-logo-modal-overlay.show {
  opacity: 1;
  visibility: visible;
} 