/* === MODAL.CSS - Modal and Toast Styles === */

/* Modal Base */
.proceed-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.3s ease-out;
}

.proceed-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.proceed-modal-container {
  position: relative;
  z-index: 10001;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.proceed-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Modal Header */
.proceed-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.proceed-modal-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  border-radius: 12px;
  filter: drop-shadow(0 4px 8px rgba(255, 120, 73, 0.3));
}

.proceed-modal-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.proceed-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.proceed-modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  transform: scale(1.1);
}

/* Modal Body */
.proceed-modal-body {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* URL Preview */
.proceed-url-preview {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 1rem;
}

.url-preview-label {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.url-preview-url {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #1e40af;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  word-break: break-all;
  font-weight: 500;
}

/* Security Info */
.proceed-security-info {
  margin: 0.5rem 0;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 0.875rem;
}

.security-badge.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 146, 60, 0.05));
  border-color: rgba(245, 158, 11, 0.3);
}

.security-badge.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  border-color: rgba(239, 68, 68, 0.3);
}

.security-icon {
  font-size: 1.25rem;
}

.security-text {
  flex: 1;
  font-weight: 500;
  color: #065f46;
  font-size: 0.875rem;
}

.security-badge.warning .security-text {
  color: #92400e;
}

.security-badge.danger .security-text {
  color: #991b1b;
}

.security-score {
  font-weight: 600;
  color: #059669;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.security-badge.warning .security-score {
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}

.security-badge.danger .security-score {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Warnings */
.proceed-warnings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.4;
}

.warning-icon {
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* Source Info */
.proceed-source-info {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 0.875rem;
}

.source-label {
  font-size: 0.75rem;
  color: #065f46;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.source-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #065f46;
}

/* Modal Footer */
.proceed-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-cancel,
.btn-proceed {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-cancel {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-cancel:hover {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-proceed {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 120, 73, 0.3);
}

.btn-proceed:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 120, 73, 0.4);
}

.btn-proceed:active,
.btn-cancel:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1rem;
}

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

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
}

.proceed-modal.closing .proceed-modal-container {
  animation: modalSlideOut 0.2s ease-in forwards;
}

.proceed-modal.closing .proceed-modal-backdrop {
  animation: modalFadeOut 0.3s ease-in forwards;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 350px;
  animation: toastSlideIn 0.3s ease-out;
  pointer-events: auto;
}

.toast.success {
  border-left: 4px solid var(--success);
  color: #065f46;
}

.toast.error {
  border-left: 4px solid var(--danger);
  color: #991b1b;
}

.toast.warning {
  border-left: 4px solid var(--warning);
  color: #92400e;
}

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

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

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

/* Responsive */
@media (max-width: 640px) {
  .proceed-modal {
    padding: 0.5rem;
  }
  
  .proceed-modal-container {
    max-height: 95vh;
  }
  
  .proceed-modal-header {
    padding: 1rem 1rem 0.75rem;
  }
  
  .proceed-modal-body {
    padding: 0 1rem 1rem;
    gap: 0.75rem;
  }
  
  .proceed-modal-footer {
    padding: 0.75rem 1rem 1rem;
    flex-direction: column;
  }
  
  .btn-cancel,
  .btn-proceed {
    padding: 1rem;
  }
  
  .proceed-modal-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
  
  .proceed-modal-title {
    font-size: 1.125rem;
  }
  
  .source-badges {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .toast-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
  }
  
  .toast {
    max-width: none;
    margin: 0 auto;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .proceed-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .proceed-modal-title {
    color: #f1f5f9;
  }
  
  .proceed-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
  }
  
  .proceed-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
  }
  
  .url-preview-label,
  .warning-item {
    color: #cbd5e1;
  }
  
  .url-preview-url {
    background: rgba(0, 0, 0, 0.3);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
  }
  
  .btn-cancel {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .btn-cancel:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
  }
  
  .toast {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .toast.success {
    color: #6ee7b7;
  }
  
  .toast.error {
    color: #fca5a5;
  }
  
  .toast.warning {
    color: #fbbf24;
  }
}