/* Modern compass layout for bridge hands */
.bridgeNotationBS {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

/* North (top) */
.bridgeNotationBS .row:first-child {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
  clear: none;
}

/* West and East (middle row) - keep side by side */
.bridgeNotationBS .row:nth-child(2) {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
  width: 100%;
  margin: 0;
  clear: none;
  flex-wrap: nowrap;
}

/* South (bottom) */
.bridgeNotationBS .row:last-child {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
  clear: none;
}

/* Panel styling */
#bridgeNotation0,
#bridgeNotation1,
#bridgeNotation2,
#bridgeNotation3 {
  width: 280px;
  margin: 0;
  flex-shrink: 0;
}

/* Remove old float styles */
#bridgeNotation3,
#bridgeNotation2 {
  float: none;
}

/* Comments */
#handComment0,
#handComment1,
#handComment2,
#handComment3 {
  width: 100%;
  max-width: 250px;
  padding-left: 0;
  font-size: 0.9em;
}

/* Override Bootstrap column classes for compass layout */
.bridgeNotationBS .row .col-xs-6,
.bridgeNotationBS .row .col-sm-6,
.bridgeNotationBS .row .col-md-6 {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 0;
}

.bridgeNotationBS .row .col-xs-12,
.bridgeNotationBS .row .col-sm-6.centering,
.bridgeNotationBS .row .col-md-6.centering {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bridgeNotationBS {
    gap: 15px;
  }
  
  #bridgeNotation0,
  #bridgeNotation1,
  #bridgeNotation2,
  #bridgeNotation3 {
    width: 240px;
    font-size: 0.9em;
  }
  
  #handComment0,
  #handComment1,
  #handComment2,
  #handComment3 {
    max-width: 220px;
    font-size: 0.85em;
  }
  
  /* Ensure West and East stay side by side */
  .bridgeNotationBS .row:nth-child(2) {
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .bridgeNotationBS {
    gap: 12px;
  }
  
  #bridgeNotation0,
  #bridgeNotation1,
  #bridgeNotation2,
  #bridgeNotation3 {
    width: 200px;
    font-size: 0.85em;
  }
  
  #handComment0,
  #handComment1,
  #handComment2,
  #handComment3 {
    max-width: 180px;
    font-size: 0.8em;
  }
  
  /* Reduce panel padding on small screens */
  .bridgeNotationBS .panel-body {
    padding: 10px;
    font-size: 0.9em;
  }
  
  .bridgeNotationBS .panel-heading {
    padding: 8px 10px;
  }
  
  .bridgeNotationBS .panel-heading h3 {
    font-size: 1em;
    margin: 0;
  }
}

@media (max-width: 412px) {
  .bridgeNotationBS {
    gap: 8px;
  }
  
  #bridgeNotation0,
  #bridgeNotation1,
  #bridgeNotation2,
  #bridgeNotation3 {
    width: 160px;
    font-size: 0.75em;
  }
  
  #handComment0,
  #handComment1,
  #handComment2,
  #handComment3 {
    max-width: 140px;
    font-size: 0.7em;
  }
  
  /* Reduce gap between West and East even more */
  .bridgeNotationBS .row:nth-child(2) {
    gap: 5px;
  }
  
  /* Further reduce panel padding on very small screens */
  .bridgeNotationBS .panel-body {
    padding: 8px;
    font-size: 0.8em;
  }
  
  .bridgeNotationBS .panel-heading {
    padding: 6px 8px;
  }
  
  .bridgeNotationBS .panel-heading h3 {
    font-size: 0.9em;
    margin: 0;
  }
  
  /* Reduce text size in hand displays */
  .bridgeNotationBS .handleft {
    font-size: 0.8em;
  }
}
