/* Invoice Page Styles */
.invoice-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-background);
  z-index: 10000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.invoice-page.active {
  display: flex;
}

/* Invoice Image Lightbox */
.invoice-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.invoice-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.invoice-lightbox-content {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 1;
}

.invoice-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.invoice-lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid white;
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.invoice-lightbox-close:hover {
  background: white;
  color: #000;
  transform: rotate(90deg);
}

.invoice-lightbox-hint {
  color: white;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.8;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .invoice-lightbox-content img {
    max-height: 80vh;
  }
  
  .invoice-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Invoice Header */
.invoice-header {
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-primary);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.invoice-close {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.invoice-close:hover {
  background: var(--color-primary);
  color: white;
}

.invoice-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  color: var(--color-accent);
  flex: 1;
  text-align: center;
}

.invoice-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary) !important;
  font-weight: 600;
}

.invoice-link i {
  font-size: 1.1rem;
}

/* Invoice Content */
.invoice-content {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.invoice-section {
  margin-bottom: 4rem;
}

.invoice-section h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.invoice-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--color-primary);
}

.invoice-description {
  text-align: center;
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.process-step {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(130, 207, 226, 0.3);
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.step-content p {
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

/* Invoice Preview */
.invoice-preview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}

.invoice-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.invoice-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(130, 207, 226, 0.4);
}

.invoice-details {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.invoice-details h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.invoice-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invoice-details ul li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--color-muted);
  line-height: 1.6;
  border-bottom: 1px solid var(--color-border);
}

.invoice-details ul li:last-child {
  border-bottom: none;
}

.invoice-details ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Important Notes */
.important-notes {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.note-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.note-item i {
  color: var(--color-primary);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.note-item p {
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

/* CTA Button */
.invoice-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
}

.invoice-cta .button {
  font-size: 1.2rem;
  padding: 1rem 3rem;
}

/* Responsive */
@media (max-width: 968px) {
  .invoice-preview-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .process-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .invoice-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .invoice-header h1 {
    font-size: 1.5rem;
  }
  
  .invoice-close span {
    display: none;
  }
  
  .invoice-content {
    padding: 2rem 1rem;
  }
  
  .invoice-section h2 {
    font-size: 1.5rem;
  }
  
  .process-step {
    flex-direction: column;
    text-align: center;
  }
  
  .step-number {
    margin: 0 auto;
  }
}

/* Dark Mode */
[data-theme="dark"] .invoice-page {
  background: #0a0e14;
}

[data-theme="dark"] .process-step,
[data-theme="dark"] .invoice-details,
[data-theme="dark"] .note-item {
  background: #1a1f26;
}

[data-theme="dark"] .invoice-image {
  border-color: var(--color-primary);
}
