/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Utility to stack buttons on mobile and align in a row on larger screens */
.stack-mobile {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}
.stack-mobile > .btn {
  flex: 1 1 0%;
  width: auto;
}
.stack-mobile > .btn.stack-first {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.stack-mobile > .btn.stack-middle {
  border-radius: 0;
}
.stack-mobile > .btn.stack-last {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

@media (max-width: 639.98px) {
  .stack-mobile {
    flex-direction: column;
  }
  .stack-mobile > .btn {
    width: 100%;
  }
  /* Restore rounded corners and remove middle borders for vertical stacking */
  .stack-mobile > .btn.stack-first {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
  }
  .stack-mobile > .btn.stack-middle {
    border-left-width: 0 !important;
    border-right-width: 0 !important;
    border-radius: 0.375rem;
  }
  .stack-mobile > .btn.stack-last {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
  }
}
