/* Product Detail Page Styles - SAP Fiori Design */

/* SAP Fiori Color Palette */
:root {
  /* Fiori Blues */
  --fiori-blue: #0854A0;
  --fiori-blue-light: #0A6ED1;
  --fiori-blue-lighter: #E5F0FA;

  /* Fiori Grays */
  --fiori-text-primary: #32363A;
  --fiori-text-secondary: #6A6D70;
  --fiori-text-tertiary: #89919A;
  --fiori-border: #D9D9D9;
  --fiori-bg-light: #F7F7F7;
  --fiori-bg-white: #FFFFFF;

  /* Fiori Semantic Colors */
  --fiori-success: #107E3E;
  --fiori-warning: #E9730C;
  --fiori-error: #BB0000;

  /* Fiori Shadows */
  --fiori-shadow-level-0: 0 0 0 1px rgba(0,0,0,0.1);
  --fiori-shadow-level-1: 0 0.125rem 0.5rem 0 rgba(0,0,0,0.1);
  --fiori-shadow-level-2: 0 0.5rem 1rem 0 rgba(0,0,0,0.15);
  --fiori-shadow-level-3: 0 1rem 2rem 0 rgba(0,0,0,0.2);

  /* Fiori Border Radius */
  --fiori-radius-small: 0.25rem;
  --fiori-radius-medium: 0.5rem;
  --fiori-radius-large: 0.75rem;

  /* Fiori Spacing (based on 0.5rem = 8px at 16px base) */
  --fiori-spacing-xs: 0.25rem;
  --fiori-spacing-sm: 0.5rem;
  --fiori-spacing-md: 1rem;
  --fiori-spacing-lg: 1.5rem;
  --fiori-spacing-xl: 2rem;
  --fiori-spacing-xxl: 3rem;
}

/* Override Product Drawing Section with Fiori Style */
.product-drawing {
  width: 100%;
  margin-top: var(--fiori-spacing-lg);
  border: 1px solid var(--fiori-border);
  border-radius: var(--fiori-radius-medium);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  background: var(--fiori-bg-white);
  box-shadow: var(--fiori-shadow-level-1);
}

.product-drawing:hover {
  border-color: var(--fiori-blue);
  box-shadow: var(--fiori-shadow-level-2);
  transform: translateY(-2px);
}

.product-drawing img {
  width: 100%;
  height: auto;
  display: block;
}

/* Drawing Modal Styles - Fiori Design */
.drawing-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(50, 54, 58, 0.9);
  justify-content: center;
  align-items: center;
}

.drawing-modal-content {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  animation: fiori-zoom 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: var(--fiori-shadow-level-3);
  border-radius: var(--fiori-radius-medium);
}

.drawing-modal-close {
  position: absolute;
  top: var(--fiori-spacing-lg);
  right: var(--fiori-spacing-lg);
  color: var(--fiori-bg-white);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(50, 54, 58, 0.5);
}

.drawing-modal-close:hover,
.drawing-modal-close:focus {
  background: var(--fiori-blue);
  transform: scale(1.1);
}

@keyframes fiori-zoom {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Chart Modal Styles - Fiori Design */
.chart-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(247, 247, 247, 0.98);
  justify-content: center;
  align-items: center;
}

.chart-modal-content {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  animation: fiori-zoom 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: var(--fiori-shadow-level-3);
  border-radius: var(--fiori-radius-medium);
  background: var(--fiori-bg-white);
  padding: var(--fiori-spacing-md);
}

.chart-modal-close {
  position: absolute;
  top: var(--fiori-spacing-lg);
  right: var(--fiori-spacing-lg);
  color: var(--fiori-text-primary);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fiori-bg-white);
  box-shadow: var(--fiori-shadow-level-1);
}

.chart-modal-close:hover,
.chart-modal-close:focus {
  background: var(--fiori-blue);
  color: var(--fiori-bg-white);
  transform: scale(1.1);
  box-shadow: var(--fiori-shadow-level-2);
}

/* Override main.css charts-gallery for Fiori grouped layout */
.charts-gallery {
  display: block !important;
}

/* Chart Group Styles - Fiori Cards */
.chart-group {
  margin-bottom: var(--fiori-spacing-xl);
  border: 1px solid var(--fiori-border);
  border-radius: var(--fiori-radius-medium);
  padding: 0;
  background-color: var(--fiori-bg-white);
  box-shadow: var(--fiori-shadow-level-1);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.chart-group:hover {
  box-shadow: var(--fiori-shadow-level-2);
}

.chart-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fiori-text-primary);
  margin: 0;
  padding: var(--fiori-spacing-md) var(--fiori-spacing-lg);
  background: var(--fiori-bg-light);
  border-bottom: 1px solid var(--fiori-border);
  letter-spacing: 0.0125rem;
  text-transform: uppercase;
}

.chart-group-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: var(--fiori-spacing-md);
}

/* Chart Item - Fiori Card Style */
.chart-group-items .chart-item {
  border: 1px solid var(--fiori-border);
  border-radius: var(--fiori-radius-small);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  background-color: var(--fiori-bg-white);
  display: flex;
  flex-direction: column;
}

.chart-group-items .chart-item:hover {
  border-color: var(--fiori-blue);
  box-shadow: var(--fiori-shadow-level-2);
  transform: translateY(-2px);
}

.chart-group-items .chart-item img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background-color: var(--fiori-bg-white);
  padding: var(--fiori-spacing-md);
  border-bottom: 1px solid var(--fiori-border);
}

/* Chart Type Label - Fiori Badge Style */
.chart-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fiori-text-secondary);
  text-transform: uppercase;
  text-align: center;
  padding: var(--fiori-spacing-sm) var(--fiori-spacing-md);
  letter-spacing: 0.0625rem;
  background: var(--fiori-bg-light);
  border-top: 1px solid var(--fiori-border);
}

/* Responsive adjustments for chart groups */
@media (max-width: 768px) {
  .chart-group-items {
    grid-template-columns: 1fr;
    gap: var(--fiori-spacing-md);
  }

  .chart-group {
    margin-bottom: var(--fiori-spacing-lg);
  }

  .chart-modal-close,
  .drawing-modal-close {
    top: var(--fiori-spacing-md);
    right: var(--fiori-spacing-md);
    width: 2.5rem;
    height: 2.5rem;
    font-size: 2rem;
  }
}

/* Additional Fiori-specific overrides for product detail page */
.product-container {
  background: var(--fiori-bg-light);
}

.product-title {
  color: var(--fiori-text-primary);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.header-hr {
  border-color: var(--fiori-blue);
  opacity: 1;
}

/* Fiori-style pricing cards */
.pricing-option {
  border-color: var(--fiori-border);
  box-shadow: var(--fiori-shadow-level-0);
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.pricing-option:hover {
  box-shadow: var(--fiori-shadow-level-2);
  border-color: var(--fiori-blue);
}

.pricing-amount {
  color: var(--fiori-blue);
}

/* Fiori-style buttons */
.buy-button {
  background-color: var(--fiori-blue);
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  font-weight: 600;
  letter-spacing: 0.0125rem;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.buy-button:hover {
  background-color: var(--fiori-blue-light);
  box-shadow: var(--fiori-shadow-level-1);
}

/* Fiori tab styling */
.tab-button {
  color: var(--fiori-text-secondary);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.0125rem;
}

.tab-button.active {
  color: var(--fiori-blue);
  border-bottom-color: var(--fiori-blue);
  font-weight: 600;
}

.tab-button:hover {
  color: var(--fiori-blue-light);
}

/* Fiori feature blocks */
.feature-title {
  color: var(--fiori-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.0125rem;
}

.feature-value {
  color: var(--fiori-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}
