/* Custom styles for Tumblelog */

/* Override font weights for lighter bold text */
:root {
  --font-weight-bold: 500;
  --font-weight-semibold: 500;
}

/* Apply REM Text font to all headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'REM', sans-serif;
}

/* Logo robot styles */
.logo-robot {
  transform: scaleX(-1); /* Flip horizontally */
  height: 32px;
  width: auto;
  margin-right: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Enhanced Avatar Styles */
.avatar.placeholder .bg-neutral {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.avatar.placeholder .bg-neutral:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Size-specific avatar improvements */
.avatar.placeholder .w-4.h-4 {
  font-size: 8px;
  font-weight: 700;
  min-width: 16px;
  min-height: 16px;
}

.avatar.placeholder .w-8.h-8 {
  font-size: 11px;
  font-weight: 600;
  min-width: 32px;
  min-height: 32px;
}

.avatar.placeholder .w-12.h-12 {
  font-size: 16px;
  font-weight: 600;
  min-width: 48px;
  min-height: 48px;
}

/* Context-specific avatar colors */
.avatar.placeholder .bg-warning\/20 {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.avatar.placeholder .bg-info\/20 {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Friend request specific styling */
.pending-request-item .avatar.placeholder div {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.sent-request-item .avatar.placeholder div {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Share modal avatar styling */
.share-modal .avatar.placeholder div {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 600;
}

/* Dark theme avatar adjustments */
:root[data-theme="dim"] .avatar.placeholder .bg-neutral {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dim"] .pending-request-item .avatar.placeholder div {
  background: linear-gradient(135deg, #d97706 0%, #ea580c 100%) !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

:root[data-theme="dim"] .sent-request-item .avatar.placeholder div {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* Avatar animation for interactive elements */
.avatar.placeholder.interactive {
  cursor: pointer;
}

.avatar.placeholder.interactive:hover {
  transform: scale(1.1);
}

.avatar.placeholder.interactive:active {
  transform: scale(0.95);
}

/* Button styles matching home page */
.btn-blue {
  background-color: #2563eb; /* blue-600 */
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-blue:hover {
  background-color: #1d4ed8; /* blue-700 */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Theme-specific header styles */
.theme-header {
  background-color: var(--color-primary);
  color: var(--color-primary-content);
}

:root[data-theme="dim"] .theme-header {
  background-color: var(--color-neutral);
  color: var(--color-neutral-content);
}

.theme-header-button {
  background-color: var(--color-primary-focus, rgba(var(--color-primary), 0.8));
  transition: background-color 0.2s ease;
}

.theme-header-button:hover {
  background-color: var(--color-primary-focus, rgba(var(--color-primary), 0.9));
}

:root[data-theme="dim"] .theme-header-button {
  background-color: var(--color-neutral-focus, rgba(var(--color-neutral), 0.8));
}

:root[data-theme="dim"] .theme-header-button:hover {
  background-color: var(--color-neutral-focus, rgba(var(--color-neutral), 0.9));
}

/* Theme-specific tab styles for preview frame */
.theme-tab {
  color: var(--color-base-content);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-tab:hover:not(.theme-tab-active) {
  background-color: var(--color-base-200);
}

.theme-tab-active {
  background-color: var(--color-primary/10);
  color: var(--color-primary-focus);
}

:root[data-theme="dim"] .theme-tab-active {
  background-color: var(--color-primary/20);
  color: var(--color-primary);
}

/* Friend add and share modal specific styles */
.friend-chips .chip {
  @apply rounded-full bg-gray-200 px-2 py-1 text-sm flex items-center gap-1;
}

.dropdown-item:hover {
  @apply bg-base-200;
}

.input-error {
  @apply border-error;
}

.character-count.text-warning {
  @apply text-warning;
}

.character-count.text-error {
  @apply text-error;
}

/* Toast animations */
@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out;
}

.animate-fade-out {
  animation: fade-out 0.3s ease-out;
}

/* Toast positioning for mobile */
@media (max-width: 768px) {
  #toast-container {
    bottom: 1rem !important;
    top: auto !important;
    left: 1rem !important;
    right: 1rem !important;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-end;
  }
  
  .toast-item {
    width: 100%;
    max-width: none;
  }
}

/* Compact friends sidebar styling */
.sidebar-friend-item:hover .friend-delete-btn {
  opacity: 1;
}

.friend-delete-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pending-request-item {
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.sidebar-avatar {
  min-width: 24px;
  min-height: 24px;
}

/* Dark theme border radius overrides */
:root[data-theme="dim"] .card,
:root[data-theme="dim"] .btn,
:root[data-theme="dim"] .input,
:root[data-theme="dim"] .badge,
:root[data-theme="dim"] .modal-box,
:root[data-theme="dim"] .dropdown-content,
:root[data-theme="dim"] .tabs-boxed,
:root[data-theme="dim"] .tab {
  border-radius: 0.375rem; /* 6px - matches light theme */
}

/* Mobile friend notification badge */
#mobile-friend-notification {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 20;
}

#mobile-friend-notification button {
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 24px;
  min-height: 24px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

#mobile-friend-notification button:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Desktop friend notification badge */
#desktop-friend-notification {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 20;
}

#desktop-friend-notification a {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

#desktop-friend-notification a:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Ensure the badges are visible on all themes */
:root[data-theme="dim"] #mobile-friend-notification button,
:root[data-theme="dim"] #desktop-friend-notification a {
  background-color: var(--warning) !important;
  color: var(--warning-content) !important;
}

:root[data-theme="dim"] .avatar {
  border-radius: 50%; /* Keep circular avatars */
}

:root[data-theme="dim"] .btn-circle {
  border-radius: 50%; /* Keep circular buttons */
}

:root[data-theme="dim"] .rounded-full {
  border-radius: 9999px; /* Keep intentionally rounded elements */
}