/* Modal Components Styles */

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 99999;
  max-width: 400px;
  word-wrap: break-word;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.notification-success {
  background-color: var(--color-positive-normal, #53d769);
  border-color: var(--color-positive-highlighted, #46c263);
  color: white;
}

.notification-error {
  background-color: var(--color-negative-normal, #fc3d39);
  border-color: var(--color-negative-highlighted, #e33437);
  color: white;
}

.notification-warning {
  background-color: #f59e0b;
  border-color: #d97706;
  color: white;
}

.notification-info {
  background-color: var(--color-recommended-normal, #5ba4fc);
  border-color: var(--color-recommended-highlighted, #5897ee);
  color: white;
}

.notification-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.notification-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Download Modal Overlay */
.download-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

/* Download Modal Content */
.download-modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

/* Modal Close Button */
.download-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 2px solid var(--color-default-highlighted, #e6e6e6);
  color: var(--color-text-primary, #2c3e50);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  z-index: 100001;
  line-height: 1;
}

.download-modal-close-btn:hover {
  background: var(--color-negative-normal, #fc3d39);
  border-color: var(--color-negative-highlighted, #e33437);
  transform: scale(1.05);
}

.download-modal-close-btn:hover .download-modal-close-icon {
  filter: invert(100%);
  transform: scale(1.2);
  translate: 0.35px 0px;
}

.download-modal-close-icon {
  width: 10px;
  height: 10px;
  filter: invert(30%);
  transition: all 0.2s ease;
}

/* Modal Header */
.completion-modal-header {
  margin-bottom: 24px;
}

.completion-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary, #2c3e50);
  margin-bottom: 8px;
}

.completion-modal-subtitle {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
}

/* Modal Stats */
.completion-modal-stats {
  margin-bottom: 24px;
}

.completion-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.completion-stat-item:last-child {
  border-bottom: none;
}

.completion-stat-label {
  font-weight: 500;
  color: var(--color-text-primary, #2c3e50);
}

.completion-stat-value-success {
  color: var(--color-positive-normal, #53d769);
  font-weight: 600;
}

.completion-stat-value-warning {
  color: #f59e0b;
  font-weight: 600;
}

.completion-stat-value-error {
  color: var(--color-negative-normal, #fc3d39);
  font-weight: 600;
}

.stat-value-with-tooltip {
  position: relative;
  cursor: help;
}

.stat-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  max-width: 280px;
  min-width: 180px;
  z-index: 100002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  white-space: normal;
  text-align: left;
  line-height: 1.3;
}

.stat-value-with-tooltip:hover .stat-tooltip {
  opacity: 1;
  visibility: visible;
}

.stat-tooltip ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-tooltip li {
  padding: 4px 0;
  border-bottom: 1px solid #555;
}

.stat-tooltip li:last-child {
  border-bottom: none;
}

.file-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.file-message {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Modal Actions */
.completion-modal-actions {
  margin-bottom: 24px;
}

.completion-modal-disclaimer {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 16px;
}

.completion-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-recommended-normal, #5ba4fc);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(91, 164, 252, 0.3);
}

.completion-download-btn:hover {
  background: var(--color-recommended-highlighted, #5897ee);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 164, 252, 0.4);
}

.completion-download-btn:active {
  transform: translateY(0);
}

/* Modal Footer */
.completion-modal-footer {
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.completion-modal-footer code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .download-modal {
    padding: 24px;
    margin: 16px;
    width: calc(100% - 32px);
  }

  .completion-modal-title {
    font-size: 1.3rem;
  }

  .stat-tooltip {
    max-width: 220px;
    min-width: 160px;
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}
