/**
 * Big Menu Styles
 * Professional implementation with responsive design
 *
 * @package UserExperienceEngine
 * @version 1.0.0
 */

/* ==========================================================================
   Big Menu Overlay
   ========================================================================== */

.uxe-big-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.uxe-big-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Position variants */
.uxe-big-menu-below {
  top: 124px; /* Adjust based on header height */
}

.uxe-big-menu-trigger {
  cursor: pointer;
}

.uxe-big-menu-fixed {
  top: 0;
}

/* Body class when menu is visible */
body.uxe-big-menu-visible {
  overflow: hidden;
}

/* ==========================================================================
   Big Menu Container
   ========================================================================== */

.uxe-big-menu-container {
  width: 100%;
  height: 600px;
  background: #fff;
  overflow: hidden;
  box-shadow: 2px 7px 10px #00000073;
}

.uxe-big-menu-content {
  display: grid;
  grid-template-columns: 250px 1fr 1fr;
  height: 100%;
  gap: 0;
}

.uxe-big-menu-content.uxe-no-right-column {
  grid-template-columns: 250px 1fr;
}

/* ==========================================================================
   Categories Column (Left)
   ========================================================================== */

.uxe-big-menu-categories {
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  overflow-y: auto;
}

.uxe-categories-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
}

.uxe-categories-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.uxe-categories-list {
  padding: 10px 0;
}

.uxe-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-weight: 400;
  font-size: 16px;
}

.uxe-category-item:hover,
.uxe-category-item.active {
  background: #fff;
  color: var(--uxe-primary-color, #4285f4);
  border-left-color: var(--uxe-primary-color, #4285f4);
  text-decoration: none;
}

.uxe-category-count {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

.uxe-category-item:hover .uxe-category-count,
.uxe-category-item.active .uxe-category-count {
  color: var(--uxe-primary-color, #4285f4);
}

/* ==========================================================================
   Content Column (Middle)
   ========================================================================== */

.uxe-big-menu-middle {
  padding: 20px;
  overflow-y: auto;
  background: #fff;
}

.uxe-category-content {
  height: 100%;
}

.uxe-category-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Content Sections */
.uxe-content-section {
  position: relative;
}

.uxe-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.uxe-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-align: left;
}

.uxe-see-all-btn,
.uxe-partner-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--uxe-primary-color, #4285f4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.uxe-see-all-btn:hover,
.uxe-partner-link:hover {
  color: var(--uxe-primary-color, #4285f4);
  text-decoration: none;
  transform: translateX(3px);
}

/* Products Circular Layout */
.uxe-products-circular {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
  align-items: flex-start;
}

.uxe-product-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-align: center;
}

.uxe-circle-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.uxe-circle-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.uxe-circle-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.uxe-circle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uxe-see-all-circle .uxe-circle-image {
  background: var(--uxe-primary-color, #4285f4);
  color: #fff;
  border-color: var(--uxe-primary-color, #4285f4);
}

.uxe-circle-link:hover .uxe-circle-image {
  border-color: var(--uxe-primary-color, #4285f4);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

.uxe-circle-label {
  font-size: 11px;
  font-weight: 500;
  color: #333;
  line-height: 1.2;
  text-align: center;
  max-width: 80px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.uxe-see-all-circle .uxe-circle-label {
  color: var(--uxe-primary-color, #4285f4);
  font-weight: 600;
}

/* Banner Section */
.uxe-banner-section {
  margin: 20px 0;
}

.uxe-horizontal-banner {
  border-radius: 8px;
  overflow: hidden;
}

.uxe-horizontal-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Partner Content */
.uxe-partner-content {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 10px;
}

.uxe-partner-content p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* No Products/Banners */
.uxe-no-products,
.uxe-no-banners {
  text-align: center;
  padding: 30px;
  color: #999;
}

/* ==========================================================================
   Banners Column (Right)
   ========================================================================== */

.uxe-big-menu-right {
  background: #f8f9fa;
  border-left: 1px solid #e9ecef;
  overflow-y: auto;
}

.uxe-category-banners {
  height: 100%;
}

.uxe-category-banners-content {
  display: flex;
  flex-direction: row;
  gap: 10px;
  height: 100%;
  padding: 20px;
}

.uxe-vertical-banner {
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  max-height: 100%;
}

.uxe-vertical-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
}

.uxe-banner-link {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.uxe-banner-link:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.uxe-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.uxe-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--uxe-primary-color, #4285f4);
  border-radius: 50%;
  animation: uxe-spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes uxe-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Fade-in animation */
.uxe-fade-in {
  opacity: 0;
  animation: uxe-fade-in 0.3s ease forwards;
}

@keyframes uxe-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Error States
   ========================================================================== */

.uxe-error-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.uxe-error-message h4 {
  margin: 0 0 10px 0;
  color: var(--uxe-error-color, #f44336);
}

.uxe-retry-btn {
  background: var(--uxe-primary-color, #4285f4);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 15px;
  transition: background-color 0.2s ease;
}

.uxe-retry-btn:hover {
  background: var(--uxe-primary-color-dark, #3367d6);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
  .uxe-big-menu-content {
    grid-template-columns: 220px 1fr 1fr;
  }

  .uxe-big-menu-content.uxe-no-right-column {
    grid-template-columns: 220px 1fr;
  }

  .uxe-product-circle {
    width: 70px;
  }

  .uxe-circle-image {
    width: 50px;
    height: 50px;
  }

  .uxe-category-banners-content {
    gap: 8px;
    padding: 15px;
  }
}

@media (max-width: 992px) {
  .uxe-big-menu-content {
    grid-template-columns: 200px 1fr 1fr;
  }

  .uxe-big-menu-content.uxe-no-right-column {
    grid-template-columns: 200px 1fr;
  }

  .uxe-products-circular {
    gap: 10px;
  }

  .uxe-product-circle {
    width: 60px;
  }

  .uxe-circle-image {
    width: 45px;
    height: 45px;
  }

  .uxe-circle-label {
    font-size: 10px;
  }

  .uxe-category-banners-content {
    padding: 10px;
    gap: 5px;
  }

  .uxe-vertical-banner img {
    min-height: 150px;
  }
}

@media (max-width: 900px) {
  .uxe-big-menu-content {
    grid-template-columns: 250px 1fr;
  }

  .uxe-big-menu-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .uxe-big-menu-content {
    grid-template-columns: 1fr;
  }

  .uxe-big-menu-categories,
  .uxe-big-menu-right {
    display: none;
  }

  .uxe-big-menu-middle {
    padding: 15px;
  }

  .uxe-products-circular {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .uxe-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .uxe-products-circular {
    justify-content: center;
    gap: 8px;
  }

  .uxe-product-circle {
    width: 55px;
  }

  .uxe-circle-image {
    width: 40px;
    height: 40px;
  }

  .uxe-circle-label {
    font-size: 9px;
    max-width: 55px;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.uxe-category-item:focus,
.uxe-circle-link:focus,
.uxe-see-all-btn:focus,
.uxe-partner-link:focus {
  outline: 2px solid var(--uxe-primary-color, #4285f4);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .uxe-big-menu-container {
    border: 2px solid #000;
  }

  .uxe-category-item:hover,
  .uxe-category-item.active {
    background: #000;
    color: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .uxe-big-menu-overlay,
  .uxe-big-menu-container,
  .uxe-category-item,
  .uxe-product-card,
  .uxe-product-image img,
  .uxe-see-all-btn,
  .uxe-partner-link {
    transition: none;
  }

  .uxe-spinner {
    animation: none;
  }

  .uxe-fade-in {
    animation: none;
    opacity: 1;
  }
}
