/**
 * AI Chat Modern Styles
 * State-of-the-art glassmorphism design with smooth animations
 */

/* ==================== Color Variables ==================== */
:root {
  --aj-orange: #FF7200;
  --aj-orange-light: #FF8C33;
  --aj-orange-dark: #E66500;
  --aj-dark: #222222;
  --aj-gray: #666666;
  --aj-light-gray: #F5F5F5;
  --aj-white: #FFFFFF;

  /* Glassmorphism colors */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: rgba(0, 0, 0, 0.1);

  /* Animation timings */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==================== Glassmorphism Base ==================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.15);
}

/* ==================== Chat Container ==================== */
#ai-chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-height: 600px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

#ai-chat-container.hidden {
  transform: translateY(100px) scale(0.8);
  opacity: 0;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  #ai-chat-container {
    width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    bottom: 10px;
    right: 20px;
    left: 20px;
  }
}

/* ==================== Chat Header ==================== */
.chat-header {
  background: linear-gradient(135deg, var(--aj-orange) 0%, var(--aj-orange-dark) 100%);
  color: var(--aj-white);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(255, 114, 0, 0.2);
}

.chat-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header .status-indicator {
  width: 8px;
  height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.chat-header button {
  background: none;
  border: none;
  color: var(--aj-white);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.chat-header button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==================== Chat Messages ==================== */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(to bottom, #f9f9f9, #ffffff);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--aj-orange);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--aj-orange-dark);
}

/* ==================== Message Bubbles ==================== */
.message {
  display: flex;
  gap: 12px;
  animation: messageSlideIn 0.3s ease-out;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse;
}

.message .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.message.bot .avatar {
  background: linear-gradient(135deg, var(--aj-orange), var(--aj-orange-light));
  color: white;
}

.message.user .avatar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.message .message-content {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 18px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.message .message-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message.bot .message-content {
  background: var(--aj-white);
  color: var(--aj-dark);
  border-bottom-left-radius: 4px;
}

.message.user .message-content {
  background: linear-gradient(135deg, var(--aj-orange), var(--aj-orange-light));
  color: var(--aj-white);
  border-bottom-right-radius: 4px;
}

/* ==================== Typing Indicator ==================== */
.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 18px;
  background: var(--aj-white);
  border-radius: 18px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--aj-orange);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ==================== Rich Content Cards ==================== */
.content-card {
  background: var(--aj-white);
  border-radius: 16px;
  padding: 20px;
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 114, 0, 0.1);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.15);
}

.content-card h4 {
  color: var(--aj-orange);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.content-card p {
  margin: 8px 0;
  color: var(--aj-dark);
  line-height: 1.6;
}

.content-card .card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.content-card .btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.content-card .btn-primary {
  background: var(--aj-orange);
  color: white;
}

.content-card .btn-primary:hover {
  background: var(--aj-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 114, 0, 0.3);
}

.content-card .btn-secondary {
  background: var(--aj-light-gray);
  color: var(--aj-dark);
}

.content-card .btn-secondary:hover {
  background: #e0e0e0;
}

/* ==================== Estimate Display ==================== */
.estimate-card {
  background: linear-gradient(135deg, #fff8f3 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 24px;
  margin-top: 12px;
  border: 2px solid var(--aj-orange);
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.2);
}

.estimate-card .price-display {
  text-align: center;
  padding: 20px;
  background: var(--aj-white);
  border-radius: 12px;
  margin: 16px 0;
}

.estimate-card .price-display .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--aj-orange);
  margin: 0;
}

.estimate-card .price-display .price-label {
  font-size: 0.9rem;
  color: var(--aj-gray);
  margin-top: 4px;
}

.estimate-card .line-items {
  background: var(--aj-white);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.estimate-card .line-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.estimate-card .line-item:last-child {
  border-bottom: none;
}

.estimate-card .line-item .item-name {
  color: var(--aj-dark);
  font-weight: 500;
}

.estimate-card .line-item .item-value {
  color: var(--aj-orange);
  font-weight: 600;
}

/* ==================== Chat Input ==================== */
.chat-input {
  background: var(--aj-white);
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input textarea {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chat-input textarea:focus {
  outline: none;
  border-color: var(--aj-orange);
  box-shadow: 0 0 0 3px rgba(255, 114, 0, 0.1);
}

.chat-input button {
  background: linear-gradient(135deg, var(--aj-orange), var(--aj-orange-light));
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.chat-input button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 114, 0, 0.4);
}

.chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== Quick Replies ==================== */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0 20px 16px;
  background: var(--aj-white);
}

.quick-reply-btn {
  background: var(--aj-light-gray);
  border: 1px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--aj-dark);
}

.quick-reply-btn:hover {
  background: var(--aj-orange);
  color: white;
  border-color: var(--aj-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 114, 0, 0.3);
}

/* ==================== Photo Upload ==================== */
.photo-upload-area {
  border: 2px dashed var(--aj-orange);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: rgba(255, 114, 0, 0.05);
  margin: 12px 0;
}

.photo-upload-area:hover {
  background: rgba(255, 114, 0, 0.1);
  border-color: var(--aj-orange-dark);
}

.photo-upload-area.drag-active {
  background: rgba(255, 114, 0, 0.15);
  transform: scale(1.02);
}

.photo-upload-area i {
  font-size: 2.5rem;
  color: var(--aj-orange);
  margin-bottom: 12px;
}

.photo-upload-area p {
  color: var(--aj-gray);
  margin: 8px 0;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast);
}

.photo-preview-item:hover {
  transform: scale(1.05);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.photo-preview-item .remove-photo:hover {
  background: rgba(255, 0, 0, 1);
}

/* ==================== Floating Chat Toggle ==================== */
.chat-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aj-orange), var(--aj-orange-light));
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.4);
  transition: all var(--transition-normal);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(255, 114, 0, 0.6);
}

.chat-toggle-btn.active {
  transform: rotate(45deg);
}

/* Notification badge */
.chat-toggle-btn .notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid white;
}

/* ==================== Loading States ==================== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 114, 0, 0.3);
  border-top-color: var(--aj-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==================== Mobile Optimizations ==================== */
@media (max-width: 768px) {
  .chat-messages {
    padding: 16px;
  }

  .message .message-content {
    max-width: 85%;
    padding: 12px 16px;
  }

  .content-card {
    padding: 16px;
  }

  .estimate-card .price-display .price {
    font-size: 2rem;
  }

  .quick-replies {
    padding: 0 16px 16px;
  }

  .chat-toggle-btn {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
  }
}

/* ==================== Accessibility ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--aj-orange);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== Estimate Display Component ==================== */
.estimate-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* Estimate Header */
.estimate-header {
  padding: 24px;
  border-radius: 16px;
  position: relative;
}

.estimate-id {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 12px;
}

.customer-info {
  animation: fadeIn 0.5s ease;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 6px;
}

.status-badge.pending {
  background: rgba(255, 193, 7, 0.2);
  color: #f57c00;
  border: 1px solid rgba(255, 193, 7, 0.4);
}

.status-badge.approved {
  background: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.status-badge.rejected {
  background: rgba(244, 67, 54, 0.2);
  color: #c62828;
  border: 1px solid rgba(244, 67, 54, 0.4);
}

.status-badge.sent {
  background: rgba(33, 150, 243, 0.2);
  color: #1565c0;
  border: 1px solid rgba(33, 150, 243, 0.4);
}

/* Estimate Sections */
.estimate-section {
  padding: 24px;
  border-radius: 16px;
  position: relative;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--aj-dark);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
}

.service-description {
  line-height: 1.6;
}

/* Line Items */
.line-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.line-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.line-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(4px);
}

.line-item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-item-content {
  flex: 1;
}

.line-item-title {
  font-weight: 600;
  color: var(--aj-dark);
  margin-bottom: 4px;
}

.line-item-details {
  font-size: 0.9rem;
  color: var(--aj-gray);
}

.line-item-price {
  font-weight: 600;
  color: var(--aj-orange);
  white-space: nowrap;
}

/* Price Range Display */
.price-range-container {
  padding: 24px 0;
}

.price-range-visual {
  margin-bottom: 24px;
}

.price-range-bar {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 100%);
  border-radius: 10px;
  margin: 40px 0;
}

.price-range-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--aj-orange) 0%, var(--aj-orange-light) 100%);
  border-radius: 10px;
  animation: fillBar 1s ease-out;
}

@keyframes fillBar {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.price-marker {
  position: absolute;
  bottom: 20px;
  transform: translateX(-50%);
}

.price-marker[data-position="low"] {
  left: 10%;
}

.price-marker[data-position="mid"] {
  left: 50%;
}

.price-marker[data-position="high"] {
  left: 90%;
}

.price-marker-label {
  font-size: 0.75rem;
  color: var(--aj-gray);
  text-align: center;
  margin-bottom: 4px;
  font-weight: 500;
}

.price-marker-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--aj-dark);
  text-align: center;
  background: white;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.price-range-summary {
  animation: fadeIn 0.8s ease;
}

/* Single Price Display */
.single-price-container {
  animation: zoomIn 0.5s ease;
}

/* Price Factors */
.price-factors {
  animation: fadeIn 0.6s ease 0.3s backwards;
}

.price-factor-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--aj-dark);
}

/* Payment Options */
.payment-options {
  animation: fadeIn 0.6s ease 0.4s backwards;
}

/* Timeline and Warranty */
.timeline-info,
.warranty-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.timeline-label {
  color: var(--aj-gray);
  min-width: 120px;
}

.timeline-value {
  font-weight: 600;
  color: var(--aj-dark);
}

.warranty-badge {
  background: linear-gradient(135deg, rgba(255, 114, 0, 0.1), rgba(255, 114, 0, 0.05));
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid rgba(255, 114, 0, 0.2);
}

/* Photos Grid */
.estimate-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.estimate-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-normal);
}

.estimate-photo-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.estimate-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: white;
  font-size: 2rem;
}

.estimate-photo-item:hover .photo-overlay {
  opacity: 1;
}

/* Estimate Footer */
.estimate-footer {
  padding: 24px;
  border-radius: 16px;
}

/* Status Messages */
.status-message {
  padding: 20px;
  border-radius: 12px;
  animation: slideUp 0.5s ease;
}

.status-message.pending {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-message.approved {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-message.rejected {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.success-icon,
.error-icon {
  flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--aj-orange), var(--aj-orange-light));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--aj-dark);
  border: 2px solid var(--aj-orange);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--aj-orange);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 114, 0, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--aj-gray);
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  color: var(--aj-dark);
  background: rgba(0, 0, 0, 0.05);
}

.btn-link {
  background: none;
  border: none;
  color: var(--aj-orange);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 16px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-link:hover {
  color: var(--aj-orange-dark);
  text-decoration: underline;
}

.estimate-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Company Footer */
.company-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 20px;
  margin-top: 20px;
}

.company-logo,
.company-contact,
.company-rating {
  animation: fadeIn 0.6s ease;
}

.terms-notice {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  line-height: 1.6;
}

/* Photo Lightbox */
.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .estimate-container {
    gap: 16px;
  }

  .estimate-header,
  .estimate-section,
  .estimate-footer {
    padding: 16px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .price-marker {
    bottom: 15px;
  }

  .price-marker-value {
    font-size: 0.9rem;
    padding: 4px 8px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .estimate-photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .company-footer > div:first-child {
    flex-direction: column;
    text-align: center;
  }

  .estimate-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-link {
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .estimate-container {
    max-width: 100%;
  }

  .action-buttons,
  .estimate-actions,
  .photo-overlay {
    display: none !important;
  }

  .estimate-header,
  .estimate-section,
  .estimate-footer {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}
