/* Modern Modal Dialog for Cart Operations - Emerald Glassmorphism */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 30, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(240,253,244,0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 0 40px rgba(16, 185, 129, 0.1);
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  position: relative;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #064e3b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: -0.5px;
}

.modal-body {
  padding: 24px 30px 30px;
}

.modal-message {
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.modal-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.modal-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 150%; height: 150%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  transition: transform 0.4s ease;
}

.modal-btn:active::after {
  transform: translate(-50%, -50%) scale(1);
  transition: 0s;
}

.modal-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.modal-btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-2px);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.modal-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(5,150,105,0.1));
  color: #10B981;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.05);
}

.modal-icon.danger {
  background: #fef2f2;
  color: #ef4444;
}

.modal-icon.warning {
  background: #fffbeb;
  color: #f59e0b;
}

.modal-icon.success {
  background: #f0fdf4;
  color: #22c55e;
}

.modal-icon.info {
  background: #eff6ff;
  color: #3b82f6;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .modal-dialog {
    margin: 20px;
    max-width: none;
    width: auto;
    border-radius: 20px;
  }
  
  .modal-header,
  .modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-btn {
    flex: none;
  }
}
