/*
 * MODAL COMPONENTS
 *
 * This file contains modal-related components and styling.
 * All modals use CSS custom properties for partner-specific theming.
 *
 * IMPORTANT FOR AI ASSISTANTS:
 * - All modals use partner colors through CSS variables
 * - Modals include proper backdrop and content styling
 * - Use these existing modal components instead of creating new ones
 * - Modals are designed to work with Bootstrap modals
 * - All modal elements have consistent styling
 *
 * USAGE:
 * Include this file in any template with modals
 * Use .modal-modern class on modal elements
 * Works with Bootstrap modal structure
 *
 * PARTNER INTEGRATION:
 * All modal colors, borders, and shadows use partner-specific variables
 * Headers use partner-colored backgrounds
 * Content uses partner text colors
 */

/* ==========================================================================
   MODAL COMPONENTS
   ========================================================================== */

/*
 * .modal-modern - Modern modal styling with partner colors
 * Uses: Partner-colored borders, headers, and content
 * Best for: Error messages, confirmations, information dialogs
 * Structure: Works with Bootstrap modal classes
 *
 * REQUIRED HTML STRUCTURE:
 * <div class="modal modal-modern">
 *   <div class="modal-dialog">
 *     <div class="modal-content">
 *       <div class="modal-header">
 *         <h5 class="modal-title">Title</h5>
 *       </div>
 *       <div class="modal-body">Content</div>
 *       <div class="modal-footer">Actions</div>
 *     </div>
 *   </div>
 * </div>
 */
.modal-modern .modal-content {
  border: 2px solid rgba(var(--partner-primary-rgb), 0.2);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(var(--partner-primary-rgb), 0.2);
}

.modal-modern .modal-header {
  background: linear-gradient(135deg, rgba(var(--partner-primary-rgb), 0.1) 0%, rgba(var(--partner-accent-rgb), 0.1) 100%);
  border-bottom: 1px solid rgba(var(--partner-primary-rgb), 0.2);
}

.modal-modern .modal-title {
  color: var(--partner-primary);
  font-weight: 600;
}

.modal-modern .modal-body {
  color: var(--partner-primary);
}

/*
 * AI ASSISTANT NOTES:
 *
 * 1. ALWAYS use these existing modal components instead of creating new ones
 * 2. All modals automatically adapt to partner colors
 * 3. Use .modal-modern class on the modal element
 * 4. Modals work with Bootstrap modal structure
 * 5. All modal elements use partner colors for consistency
 * 6. Headers have gradient backgrounds using partner colors
 * 7. Content text uses partner primary color
 * 8. Borders and shadows use partner colors
 * 9. Modals are designed to be accessible and user-friendly
 * 10. Use CSS variables for all colors - never hardcode colors
 * 11. Combine with components.css, buttons.css for complete modal layouts
 * 12. Test modals with different partner color schemes
 * 13. Modals include proper contrast ratios for accessibility
 */

/* ==========================================================================
   WEEKEND BLOCKING MODAL
   ========================================================================== */

/*
 * .weekend-blocking-modal - Modal that blocks all site interactions on weekend days
 * Uses: High z-index, full-screen backdrop, prevents all clicks
 * Best for: Blocking orders on weekend/holiday days
 */
.weekend-blocking-modal {
  z-index: 9999 !important;
}

.weekend-blocking-modal .modal-dialog {
  z-index: 10000;
}

.weekend-blocking-modal .modal-content {
  border: 3px solid rgba(var(--partner-primary-rgb), 0.3);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.weekend-blocking-modal .modal-body {
  padding: 3rem;
}

.weekend-blocking-modal .modal-title {
  color: var(--partner-primary);
  font-weight: 700;
  font-size: 2rem;
}

.weekend-blocking-modal .lead {
  color: #333;
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Preserve line breaks and spacing for weekend text */
.weekend-text {
  white-space: pre-wrap;
}

.weekend-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  pointer-events: all;
}

/* Prevent all interactions when weekend modal is shown */
body.weekend-blocked {
  overflow: hidden !important;
  pointer-events: none !important;
}

body.weekend-blocked * {
  pointer-events: none !important;
}

body.weekend-blocked .weekend-blocking-modal,
body.weekend-blocked .weekend-blocking-modal * {
  pointer-events: all !important;
}
