/* =============================================================================
   MODAL STYLES - Overlays, Info Modals, File Modals
   ============================================================================= */

/* Modal Overlay Base */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.show {
  display: flex;
}

/* Info Modal */
.info-modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideInModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
  background: #e2e8f0;
  color: #374151;
  transform: scale(1.1);
}

.modal-header {
  margin-bottom: 30px;
  text-align: center;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.modal-subtitle {
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
}

.modal-content {
  line-height: 1.6;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section p {
  color: #4b5563;
  margin-bottom: 8px;
}

.modal-section ul {
  color: #4b5563;
  padding-left: 20px;
  margin-bottom: 8px;
}

.modal-section li {
  margin-bottom: 4px;
}

.highlight-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #0ea5e9;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.highlight-box h4 {
  color: #0c4a6e;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-box p {
  color: #075985;
  margin: 0;
}

/* File Edit/New Modals */
#editFileModal .modal-content, 
#newFileModal .modal-content {
  background: white;
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: 20px;
  min-width: 520px;
  max-width: 90vw;
  max-height: 90vh;
  width: 850px;
  box-shadow: 0 8px 40px rgba(70, 60, 120, 0.20);
  border: 1.5px solid #667eea26;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#editFileModal textarea, 
#newFileModal textarea {
  width: 100%;
  min-height: 350px;
  max-height: 600px;
  font-size: 15px;
  padding: 18px;
  border: 1.5px solid #a5b4fc;
  border-radius: 10px;
  background: #f6f7fb;
  color: #293046;
  font-family: 'Fira Mono', 'Menlo', 'Consolas', monospace;
  margin-bottom: 18px;
}

#editFileModal h3, 
#newFileModal h3 {
  color: #473B7B;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  flex-direction: row !important;
  gap: 24px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.modal-btn {
  font-size: 16px;
  padding: 13px 32px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  outline: none;
}

.modal-btn:hover {
  background: linear-gradient(90deg, #6d83f5, #a084ee);
  transform: translateY(-2px);
}

.modal-btn.cancel {
  background: #e0e7ef;
  color: #4a5568;
}

.modal-btn.cancel:hover {
  background: #dbeafe;
}

/* Repository Modal */
#repositoryModal .modal-content {
  max-width: 600px;
  width: 90vw;
}

/* Schedule Modal */
#scheduleModal .modal-content {
  max-width: 700px;
  width: 90vw;
}