/* Custom Modal System */

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10005;
  animation: fadeIn 0.3s ease;
}

.custom-modal-overlay.active {
  display: flex;
}

.custom-modal {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid #FFD700;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  position: relative;
}

.custom-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.custom-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.custom-modal-icon.success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 2px solid #10b981;
}

.custom-modal-icon.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 2px solid #ef4444;
}

.custom-modal-icon.warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 2px solid #fbbf24;
}

.custom-modal-icon.info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.custom-modal-title {
  color: #FFD700;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.custom-modal-body {
  color: #ddd;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.custom-modal-body strong {
  color: #FFD700;
  display: block;
  margin-top: 0.5rem;
}

.custom-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.custom-modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-modal-btn.primary {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
}

.custom-modal-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.custom-modal-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-modal-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.custom-modal-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
}

.custom-modal-btn.danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.custom-modal-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.custom-modal-btn.success:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .custom-modal {
    max-width: 90%;
    padding: 1.75rem;
  }

  .custom-modal-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .custom-modal-title {
    font-size: 1.35rem;
  }

  .custom-modal-body {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .custom-modal {
    padding: 1.5rem;
    width: 95%;
  }

  .custom-modal-header {
    flex-direction: column;
    text-align: center;
  }

  .custom-modal-icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .custom-modal-title {
    font-size: 1.2rem;
  }

  .custom-modal-body {
    font-size: 0.9rem;
  }

  .custom-modal-footer {
    flex-direction: column;
  }

  .custom-modal-btn {
    width: 100%;
    justify-content: center;
  }
}


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

@media (max-width: 768px) {
  .modal {
    width: 95%;
    max-width: 95%;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-input, .form-select, textarea {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .payment-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .payment-option {
    padding: 0.75rem;
  }

  .payment-option i {
    font-size: 1.25rem;
  }

  .payment-option p {
    font-size: 0.8rem;
  }

  .price-display {
    padding: 0.75rem;
  }

  .price-display .label {
    font-size: 0.9rem;
  }

  .price-display .amount {
    font-size: 1.5rem;
  }

  .submit-btn {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal-header {
    padding: 0.75rem;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .close-btn {
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  .form-input, .form-select, textarea {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .payment-options {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .payment-option {
    padding: 0.6rem;
  }

  .payment-option i {
    font-size: 1.1rem;
  }

  .payment-option p {
    font-size: 0.75rem;
  }

  .price-display {
    padding: 0.6rem;
  }

  .price-display .label {
    font-size: 0.85rem;
  }

  .price-display .amount {
    font-size: 1.3rem;
  }

  .submit-btn {
    padding: 0.65rem;
    font-size: 0.9rem;
  }
}


/* ========== REPORT SUBMISSION MODAL STYLES ========== */

.report-modal-content {
  text-align: left;
}

.report-modal-intro {
  margin-bottom: 1rem;
}

.report-summary-box {
  background: rgba(99, 102, 241, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.report-summary-title {
  font-weight: 600;
  color: #4f46e5;
  margin-bottom: 0.5rem;
}

.report-summary-item {
  margin: 0.25rem 0;
}

.report-modal-footer-text {
  font-size: 0.875rem;
  color: #6b7280;
}


/* Light Mode Support for Modals */
body:not(.dark-mode) .custom-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

body:not(.dark-mode) .custom-modal {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) .custom-modal-title {
  color: #1a202c;
}

body:not(.dark-mode) .custom-modal-body {
  color: #4a5568;
}

body:not(.dark-mode) .custom-modal-body strong {
  color: #2d3748;
}

body:not(.dark-mode) .custom-modal-btn.secondary {
  background: #f7fafc;
  color: #1a202c;
  border: 1px solid #e2e8f0;
}

body:not(.dark-mode) .custom-modal-btn.secondary:hover {
  background: #edf2f7;
}


/* ========== MATERIAL THEME SUPPORT FOR MODALS ========== */

[data-theme="material"] .custom-modal-overlay {
  background: var(--overlay);
}

[data-theme="material"] .custom-modal {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 0 20px 60px var(--shadow);
}

[data-theme="material"] .custom-modal-title {
  color: var(--accent-primary);
}

[data-theme="material"] .custom-modal-body {
  color: var(--text-secondary);
}

[data-theme="material"] .custom-modal-body strong {
  color: var(--accent-primary);
}

[data-theme="material"] .custom-modal-btn.primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: #ffffff;
}

[data-theme="material"] .custom-modal-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.4);
}

[data-theme="material"] .custom-modal-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

[data-theme="material"] .custom-modal-btn.secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

[data-theme="material"] .report-summary-box {
  background: rgba(100, 181, 246, 0.15);
  border: 1px solid var(--border-color);
}

[data-theme="material"] .report-summary-title {
  color: var(--accent-primary);
}

[data-theme="material"] .report-modal-footer-text {
  color: var(--text-muted);
}
