/* Global Create Modal Styles */

.global-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.global-create-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.global-create-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.global-create-btn-icon {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.global-create-btn-text {
  font-size: 14px;
  font-weight: 500;
}

/* Modal Overlay */
.global-create-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
}

/* Modal Container */
.global-create-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  z-index: 9999;
  max-width: 800px;
  width: 90vw;
  max-height: 85vh;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.global-create-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.global-create-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.global-create-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #6b7280;
  transition: all 0.2s ease;
}

.global-create-modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Modal Body */
.global-create-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.create-modal-section {
  margin-bottom: 32px;
}

.create-modal-section:last-child {
  margin-bottom: 0;
}

.create-modal-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.create-modal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.create-modal-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.create-modal-card:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.create-modal-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-modal-card-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.create-modal-card-content {
  flex: 1;
  min-width: 0;
}

.create-modal-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.create-modal-card-description {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .global-create-modal {
    width: 95vw;
    max-height: 90vh;
  }
  
  .global-create-modal-header {
    padding: 16px 20px;
  }
  
  .global-create-modal-body {
    padding: 20px;
  }
  
  .create-modal-cards {
    grid-template-columns: 1fr;
  }
  
  .create-modal-section {
    margin-bottom: 24px;
  }
  
  .create-modal-card {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .global-create-btn-text {
    display: none;
  }
  
  .global-create-btn {
    padding: 8px 12px;
  }
  
  .create-modal-card {
    padding: 10px;
    gap: 10px;
  }
  
  .create-modal-card-icon {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }
}

/* Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

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

.global-create-modal-overlay {
  animation: overlayFadeIn 0.2s ease-out;
}

.global-create-modal {
  animation: modalFadeIn 0.3s ease-out;
}

/* Module-level Create Button Styles */
.crm-module-create-btn,
.b2b-module-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  min-width: 120px;
}

.crm-module-create-btn:hover,
.b2b-module-create-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.crm-module-create-btn:active,
.b2b-module-create-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.crm-module-create-icon,
.b2b-module-create-icon {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.crm-module-create-text,
.b2b-module-create-text {
  font-size: 13px;
  font-weight: 500;
}

/* Empty State Create Button Styles */
.crm-empty-state,
.b2b-empty-state {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin: 20px 0;
}

.crm-empty-icon,
.b2b-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.crm-empty-title,
.b2b-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
}

.crm-empty-description,
.b2b-empty-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 24px 0;
  max-width: 320px;
}

.crm-empty-create-btn,
.b2b-empty-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.crm-empty-create-btn:hover,
.b2b-empty-create-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.crm-empty-create-btn:active,
.b2b-empty-create-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.crm-empty-create-icon,
.b2b-empty-create-icon {
  font-size: 18px;
  font-weight: 600;
}

.crm-empty-create-text,
.b2b-empty-create-text {
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .crm-module-create-text,
  .b2b-module-create-text {
    display: none;
  }
  
  .crm-module-create-btn,
  .b2b-module-create-btn {
    padding: 8px 10px;
    min-width: auto;
  }
  
  .crm-empty-state,
  .b2b-empty-state {
    padding: 40px 20px;
    margin: 10px 0;
  }
  
  .crm-empty-icon,
  .b2b-empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
  }
  
  .crm-empty-title,
  .b2b-empty-title {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .crm-empty-description,
  .b2b-empty-description {
    font-size: 13px;
    margin-bottom: 20px;
  }
  
  .crm-empty-create-btn,
  .b2b-empty-create-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}
