/* Pawprint Wrapper - Sidebar Styles */

:root {
  --sidebar-width: 320px;
  --sidebar-bg: #1e1e1e;
  --sidebar-text: #e0e0e0;
  --sidebar-accent: #007acc;
  --sidebar-border: #333;
  --sidebar-shadow: 0 0 20px rgba(0,0,0,0.5);
  --card-bg: #2a2a2a;
  --card-hover: #3a3a3a;
  --success: #4caf50;
  --error: #f44336;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Sidebar Container */
#pawprint-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  box-shadow: var(--sidebar-shadow);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#pawprint-sidebar.expanded {
  transform: translateX(0);
}

/* Toggle Button */
#sidebar-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border: 1px solid var(--sidebar-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 12px 8px;
  cursor: pointer;
  z-index: 10000;
  font-size: 16px;
  transition: background 0.2s;
  box-shadow: -2px 0 8px rgba(0,0,0,0.3);
}

#sidebar-toggle:hover {
  background: var(--card-hover);
}

#sidebar-toggle .icon {
  display: block;
  transition: transform 0.3s;
}

#pawprint-sidebar.expanded ~ #sidebar-toggle .icon {
  transform: scaleX(-1);
}

/* Header */
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--sidebar-border);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--sidebar-accent);
}

.sidebar-header .nest-name {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Content */
.sidebar-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* Panel */
.panel {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--sidebar-border);
}

.panel h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--sidebar-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Current User Display */
.current-user {
  padding: 12px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}

.current-user strong {
  color: var(--success);
  font-weight: 600;
}

.current-user .logout-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: var(--error);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  width: 100%;
}

.current-user .logout-btn:hover {
  background: rgba(244, 67, 54, 0.2);
}

/* User Cards */
.user-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-card:hover {
  background: var(--card-hover);
  border-color: var(--sidebar-accent);
  transform: translateX(-2px);
}

.user-card.active {
  background: rgba(0, 122, 204, 0.2);
  border-color: var(--sidebar-accent);
}

.user-card .icon {
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.user-card .info {
  flex: 1;
}

.user-card .label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.user-card .role {
  display: block;
  font-size: 11px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status Messages */
.status-message {
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}

.status-message.success {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: var(--success);
}

.status-message.error {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
  color: var(--error);
}

.status-message.info {
  background: rgba(0, 122, 204, 0.1);
  border-color: rgba(0, 122, 204, 0.3);
  color: var(--sidebar-accent);
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--sidebar-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Scrollbar */
#pawprint-sidebar::-webkit-scrollbar {
  width: 8px;
}

#pawprint-sidebar::-webkit-scrollbar-track {
  background: #1a1a1a;
}

#pawprint-sidebar::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

#pawprint-sidebar::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 11px;
  opacity: 0.5;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  #pawprint-sidebar {
    width: 100%;
  }
}
