ui/components-lib/src/components/Card/_layouts.scss
@use '../../styles/colors' as *;

$breakpoint-horizontal: 1500px;
$card-max-width: 1000px;
$card-min-width-horizontal: 700px;
$card-min-width-single: 500px;
$card-gap-vertical: 100px;
$card-gap-horizontal: 10px;
$card-padding: 24px;

$extension-card-width: 400px;
$extension-card-gap: 30px;
$extension-wrapper-gap: 20px;

@mixin vertical-layout {
  .env-cards-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    gap: 20px;
    justify-content: center; 
    scroll-behavior: smooth;
    box-sizing: border-box;
    margin: 0;
  }
  
  .env-cards-wrapper {
    padding: 0;
    display: flex;
    gap: $card-gap-vertical;
    margin: 0 auto;
    align-items: stretch;
  }
  
  .env-card-column {
    flex: 0 0 auto;
    max-width: 350px;
    display: flex;
  }
  
  .env-card {
    flex: 1;
    width: 425px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    
    &.single-commit-group {
      min-height: 250px;
      height: auto;
    }
  }
  
  // Force height override for single-commit-group in vertical layout
  .env-card.single-commit-group {
    min-height: 300px;
    height: auto;
    max-height: 400px;
  }
  
  .commit-group.proposed {
    flex: 1;
  }
}

@mixin horizontal-layout {
  .env-cards-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-x: auto;
  }
  
  .env-cards-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 0 5px;
    max-width: 100vw;
    max-width: $card-max-width;
    box-sizing: border-box;
    gap: $card-gap-horizontal; 
  }
  
  .env-card-column {
    width: 90%;
    max-width: 100%;
    margin-bottom: $card-gap-horizontal;
  }
  
  .env-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    width: 100%;
    max-width: 100%;
    min-width: $card-min-width-horizontal; 
    box-sizing: border-box;
    min-height: auto;
    
    &.single-commit-group {
      grid-template-columns: 1fr;
      max-width: 70%; 
      margin: 0; 
      min-width: $card-min-width-single; 
      min-height: 250px;
      height: auto;
    }
  }
  

  
  .env-card__title {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 20px;
  }
  
  .commit-group:not(.proposed) {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    padding-right: 16px; 
  }
  
  .commit-group.proposed {
    grid-column: 2;
    grid-row: 1 / -1;
    margin: 0;
    margin-top: -$card-padding;
    margin-right: -$card-padding;
    margin-bottom: -$card-padding;
    padding: 12px;
    padding-top: 65px;
    border-radius: 8px 0 0 8px;
    border-left: 3px solid $argo-running;
    border-top: 0;
    background: linear-gradient(135deg, rgba(13, 173, 234, 0.06) 0%, rgba(13, 173, 234, 0.03) 100%);
    min-width: 0;
  }
}

 