/**
 * Inquiry Modal CSS - Modal Styling and Interactions
 * 
 * SCOPE: Styling for inquiry confirmation modals and overlays
 * 
 * ACTIONS INCLUDED:
 * - Modal overlay and backdrop styling
 * - Modal content positioning and sizing
 * - Form styling within modals
 * - Loading states and animations
 * - Success/error state styling
 * - Responsive design for mobile devices
 */

/* Single Product Page Button */
.inquiry-based .single_add_to_cart_button {
  display: none !important;
}
.il-inquiry-trigger {
  background-color: #021a4f;
  border: 1px solid #021a4f;
  transition: 0.1s all ease;
  color: white;
  padding: 16px 24px;
}

.il-inquiry-trigger {
  grid-column: 2/3 !important;
  justify-self: start;
}

.il-inquiry-trigger:hover {
  background-color: white;
  color: #021a4f;
  cursor: pointer;
}

.il-item-details {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.attribute-row.product-name {
  background-color: #f8f9fa;
  max-width: 100%;
  padding: 16px;
  margin: 0;
  border-bottom: 1px solid #eee;
}

.single-product.inquiry-based .il-variation-attributes {
	padding: 6px 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.single-product.inquiry-based .attribute-row:not(.product-name) {
	max-width: max-content;
	display: flex;
}

.single-product.inquiry-based .attribute-label::after {
	content: ":";
	margin-right: 2px;
}

.single-product.inquiry-based .attribute-label {
	display: block;
	font-size: 12px;
	color: #6b7280;
	text-transform: lowercase;
}

.single-product.inquiry-based .attribute-row:not(.product-name):not(:last-of-type) .attribute-value::after {
	content: ",";
}

.single-product.inquiry-based .attribute-row:not(.product-name) .attribute-value {
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	font-weight: 400;
}


/* Modal Overlay */
.il-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.il-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.il-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 640px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.il-modal-overlay.active .il-modal {
  transform: scale(1);
}

/* Modal Header */
.il-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.il-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.il-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.il-modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Modal Content */
.il-modal-content {
  padding: 24px;
}

/* Inquiry Details */
.il-inquiry-details {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.il-inquiry-detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.il-inquiry-detail-item:last-child {
  margin-bottom: 0;
}

.il-inquiry-detail-label {
  font-weight: 500;
  color: #374151;
}

.il-inquiry-detail-value {
  color: #111827;
}

/* Form Elements */
.il-modal-form {
  margin-bottom: 20px;
}

.il-inquiry-variation {
  margin-bottom: 16px;
}

.attribute-row.product-name .attribute-value {
  border: none;
}

.il-form-group {
  margin-bottom: 16px;
}

.il-form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.il-form-input,
.il-form-textarea,
.il-form-select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.il-form-input:focus,
.il-form-textarea:focus,
.il-form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.il-form-input[readonly] {
  background-color: #f9fafb;
  color: #1f2937;
  cursor: not-allowed;
}

.il-form-textarea {
  resize: vertical;
}

/* Modal Actions */
.il-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px 24px;
  border-top: 1px solid #e5e7eb;
}

.il-btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.il-btn-primary {
  background-color: #3b82f6;
  color: white;
}

.il-btn-primary:hover {
  background-color: #2563eb;
}

.il-btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.il-btn-secondary:hover {
  background-color: #e5e7eb;
}

.il-btn-danger {
  background-color: #dc2626;
  color: white;
}

.il-btn-danger:hover {
  background-color: #b91c1c;
}

.il-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading State */
.il-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Success State */
.il-success-message {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.il-success-icon {
  color: #059669;
  font-size: 16px;
}

/* Error State */
.il-error-message {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.il-error-icon {
  color: #dc2626;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 640px) {
  .il-modal {
    width: 95%;
    margin: 20px;
  }

  .il-modal-header,
  .il-modal-content,
  .il-modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .il-modal-actions {
    flex-direction: column;
  }

  .il-btn {
    width: 100%;
  }
}

/* Animation Classes */
.il-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Redacted Content Styling */
.il-redacted {
  color: #dc2626;
  background-color: #fef2f2;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}
