/**
 * Calculator Project Info - FAB + Drawer Design
 * Floating button som öppnar en modal med projektinformation
 */

/* ==================== FLOATING ACTION BUTTON (FAB) ==================== */

.project-info-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0);
}

.project-info-fab.visible {
  opacity: 1;
  transform: scale(1);
}

.project-info-fab.hidden {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.project-info-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(102, 126, 234, 0.6);
}

.project-info-fab:active {
  transform: scale(0.95);
}

.project-info-fab .fab-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.project-info-fab:hover .fab-tooltip {
  opacity: 1;
}

/* Enhanced Tooltip */
.fab-tooltip-enhanced {
  position: absolute;
  right: 70px;
  bottom: 0;
  min-width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: all 0.3s ease;
  padding: 16px;
}

.project-info-fab:hover .fab-tooltip-enhanced {
  opacity: 1;
  transform: translateX(0);
}

.fab-tooltip-enhanced .tooltip-header {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #10b981;
}

.fab-tooltip-enhanced .tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fab-tooltip-enhanced .tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.fab-tooltip-enhanced .tooltip-row strong {
  color: #1f2937;
  font-weight: 600;
}

.fab-tooltip-enhanced .tooltip-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e5e7eb 50%, transparent 100%);
  margin: 4px 0;
}

.fab-tooltip-enhanced .tooltip-row.total {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.fab-tooltip-enhanced .tooltip-row.total strong {
  color: #10b981;
  font-size: 16px;
}

.fab-tooltip-enhanced .tooltip-hint {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid white;
  animation: badgePulse 0.3s ease;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ==================== DRAWER OVERLAY ==================== */

.project-info-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}

.project-info-drawer.open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-info-drawer.open .drawer-backdrop {
  opacity: 1;
}

/* ==================== DRAWER CONTENT ==================== */

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-info-drawer.open .drawer-content {
  transform: translateX(0);
}

/* ==================== DRAWER HEADER ==================== */

.drawer-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

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

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

.drawer-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==================== DRAWER BODY ==================== */

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f7fafc;
}

/* ==================== PROJECT OVERVIEW ==================== */

.project-overview {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.overview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.overview-item:last-child {
  border-bottom: none;
}

.overview-item i {
  color: #667eea;
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.overview-item > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.overview-item .label {
  font-size: 0.75rem;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.overview-item .value {
  font-size: 1rem;
  color: #2d3748;
  font-weight: 500;
}

/* ==================== SECTIONS ==================== */

.info-section {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
}

.section-title i {
  color: #667eea;
}

.section-content {
  color: #4a5568;
  line-height: 1.6;
}

/* ==================== GUIDED ANSWERS ==================== */

.answer-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.answer-item:last-child {
  border-bottom: none;
}

.answer-question {
  font-size: 0.875rem;
  color: #718096;
  margin-bottom: 4px;
}

.answer-value {
  font-size: 1rem;
  color: #2d3748;
  font-weight: 500;
}

.copy-btn {
  background: #edf2f7;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #667eea;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: #667eea;
  color: white;
}

/* ==================== IMAGES GRID ==================== */

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.image-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #e2e8f0;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.image-thumb:hover img {
  transform: scale(1.05);
}

.image-thumb:hover::after {
  content: '\f00e';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 24px;
}

/* ==================== IMAGE GALLERY MODAL ==================== */

.image-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.gallery-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.gallery-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  transition: background 0.2s;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-prev {
  left: -60px;
}

.gallery-next {
  right: -60px;
}

.gallery-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.2s;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 12px;
  border-radius: 20px;
}

/* ==================== CALCULATOR SUGGESTIONS ==================== */

.calculator-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.calculator-chip {
  background: #edf2f7;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #4a5568;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calculator-chip:hover {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.calculator-chip i {
  font-size: 14px;
}

/* ==================== CONTEXT TIPS ==================== */

.tip-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.tip-box i {
  color: #f59e0b;
  margin-right: 8px;
}

.tip-text {
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ==================== QUICK ACTIONS ==================== */

.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.action-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Smart quote button specific styling */
#smartQuoteBtn {
  min-width: 200px;
}

#smartQuoteBtnText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsiv styling för mindre skärmar */
@media (max-width: 768px) {
  .action-btn {
    font-size: 0.85rem;
    padding: 10px 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  
  #smartQuoteBtn {
    min-width: unset;
  }
}

.action-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-btn-primary:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transform: translateY(-1px);
}

.action-btn--loading {
  pointer-events: none;
  opacity: 0.9;
  cursor: wait;
  transform: none;
}

.action-btn--loading:hover {
  transform: none;
  box-shadow: none;
}

.drawer-content--exporting {
  position: relative;
}

.basket-export-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 20;
  cursor: wait;
}

.action-btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.action-btn-secondary:hover {
  background: #f7fafc;
  transform: translateY(-1px);
}

.action-btn-home {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* ==================== ARTICLE BASKET ==================== */

.basket-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.basket-clear-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  background: #fff5f5;
  color: #c53030;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.basket-clear-all-btn:hover {
  background: #fed7d7;
  border-color: #fc8181;
}

.basket-clear-all-btn i {
  font-size: 0.7rem;
}

.basket-count {
  display: inline-block;
  background: #667eea;
  color: white;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
  text-align: center;
  line-height: 24px;
}

.empty-basket {
  color: #a0aec0;
  font-style: italic;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.basket-articles {
  margin-top: 0.75rem;
}

.basket-group {
  background: #f7fafc;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.basket-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edf2f7;
  padding: 0.75rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.875rem;
  border-bottom: 1px solid #e2e8f0;
}

.basket-group-header i {
  color: #667eea;
}

.basket-group-header .article-count {
  margin-left: auto;
  background: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #718096;
}

.basket-group-items {
  padding: 0.5rem;
}

.basket-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.basket-item:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.basket-item:last-child {
  margin-bottom: 0;
}

/* Item Icon */
.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(102, 126, 234, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-icon i {
  font-size: 16px;
}

/* Item Content */
.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-desc {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
  word-wrap: break-word;
}

.item-breakdown {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
  margin-top: -0.15rem;
}

.item-work-description {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
}

.item-work-description__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

.item-work-description__body {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #475569;
}

.item-total {
  font-weight: 700;
  color: #667eea;
  font-size: 1rem;
  white-space: nowrap;
}

/* Item Details - Quantity Editor */
.item-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.item-quantity-editor {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7fafc;
  border-radius: 8px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: white;
  color: #667eea;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: #667eea;
  color: white;
  transform: scale(1.1);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-input {
  width: 60px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3748;
  background: white;
  padding: 0 4px;
  transition: all 0.2s;
}

.qty-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qty-unit {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 500;
  white-space: nowrap;
}

.item-price {
  font-size: 0.85rem;
  color: #718096;
  white-space: nowrap;
}

.item-price-editor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #718096;
  white-space: nowrap;
}

.item-price-mult {
  color: #94a3b8;
  font-weight: 600;
}

.item-price-editor .price-input {
  width: 88px;
  padding: 6px 8px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #10b981;
  text-align: right;
  background: #f0fdf4;
}

.item-price-editor .price-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.item-price-unit {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

/* Item Remove */
.item-remove {
  background: #fed7d7;
  border: none;
  color: #c53030;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-start;
}

.item-remove:hover {
  background: #fc8181;
  color: white;
  transform: scale(1.1);
}

.item-remove:active {
  transform: scale(0.95);
}

.basket-totals {
  margin-top: 1rem;
  padding: 1rem;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: #4a5568;
  font-size: 0.9rem;
}

.total-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.total-grand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #667eea;
  padding-top: 0.75rem !important;
}

/* ==================== NO PROJECT NOTICE ==================== */

.no-project-notice {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}

.no-project-notice i.fa-info-circle {
  font-size: 32px;
  color: #f59e0b;
  margin-bottom: 12px;
}

.no-project-notice p {
  color: #78350f;
  font-size: 14px;
  margin: 8px 0 16px 0;
  line-height: 1.5;
}

.no-project-notice .help-icon {
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  position: relative;
  vertical-align: middle;
}

.no-project-notice .help-icon i {
  font-size: 16px;
  color: #f59e0b;
  transition: all 0.2s ease;
}

.no-project-notice .help-icon:hover i {
  color: #d97706;
  transform: scale(1.1);
}

/* Tooltip för help-icon */
.no-project-notice .help-icon::before {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  width: 240px;
  max-width: 300px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  text-align: left;
}

.no-project-notice .help-icon::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.no-project-notice .help-icon:hover::before,
.no-project-notice .help-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.btn-create-project {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-create-project i {
  font-size: 16px;
}

.btn-create-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-create-project:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.project-switch-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-new-assignment,
.btn-new-quote-link {
  width: 100%;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn-new-assignment {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.btn-new-assignment:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-new-quote-link {
  border: none;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.btn-new-quote-link:hover {
  filter: brightness(1.05);
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Pulse animation removed for better UX */
@keyframes pulse-removed {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.15);
  }
  50% {
    transform: scale(1.05);
  }
  75% {
    transform: scale(1.1);
  }
}

/* ==================== RESPONSIVE - MOBILE ==================== */

@media (max-width: 768px) {
  .drawer-content {
    max-width: 100%;
  }
  
  .project-info-fab {
    /* Ovanför mobilmeny — inkl. safe-area och iOS Safari viewport-gap */
    bottom: calc(
      80px + env(safe-area-inset-bottom, 0px) + var(--ios-safari-vv-gap, 0px)
    ) !important;
    right: max(16px, env(safe-area-inset-right, 0px)) !important;
    width: 56px !important;
    height: 56px !important;
    font-size: 22px !important;
    z-index: 100003 !important;
  }
  
  .fab-badge {
    top: -2px !important;
    right: -2px !important;
    min-width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
  }
  
  .fab-tooltip-enhanced {
    display: none !important; /* Dölj tooltip på mobil för att spara utrymme */
  }
  
  .gallery-prev {
    left: 8px;
  }
  
  .gallery-next {
    right: 8px;
  }
  
  .gallery-close {
    top: 8px;
    right: 8px;
  }
}

/* ==================== EXPORT / ANSVAR (Verktygsväskan) ==================== */

.basket-export-disclaimer {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.basket-export-disclaimer i {
  color: #64748b;
  margin-right: 0.35rem;
}

.basket-export-disclaimer strong {
  color: #334155;
  font-weight: 600;
}

/* ==================== KORG-KONTEXT (snabbkorg / projektmapp) ==================== */

.basket-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 0.8125rem;
}

.drawer-basket-context {
  padding: 0.65rem 1rem 0;
  flex-shrink: 0;
}

.drawer-title-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.drawer-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basket-context-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.basket-context-hint {
  font-size: 0.7rem;
  font-weight: 500;
  color: #3b82f6;
  line-height: 1.3;
}

.basket-context-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: #1e40af;
  font-weight: 600;
  min-width: 0;
  flex: 1;
}

.basket-context-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basket-context-switch {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #93c5fd;
}

.basket-context-switch:hover {
  background: #eff6ff;
}

.basket-folder-picker {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.basket-folder-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.55rem;
}

.basket-folder-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.basket-folder-select {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
  color: #1e293b;
}

.basket-folder-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.basket-folder-create-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #6366f1;
  border-radius: 8px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.basket-folder-create-btn:hover {
  background: #e0e7ff;
}

.basket-folder-hint {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
}

.basket-folder-save-btn {
  width: 100%;
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.basket-folder-save-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.project-stat-basket {
  color: #6366f1;
}

.project-basket-summary {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.project-basket-summary p {
  margin: 0 0 0.75rem;
  color: #475569;
  font-size: 0.875rem;
}

.basket-folder-save-btn-finish {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

.basket-folder-hint strong {
  color: #334155;
}

/* ==================== SCROLLBAR STYLING ==================== */

.drawer-body::-webkit-scrollbar {
  width: 8px;
}

.drawer-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}
