/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps.
 * You can include application-wide styles in this file.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom styles to complement Bootstrap */

/* Add spacing to form groups */
.form-group {
  margin-bottom: 1rem;
}

/* Form styling improvements */
.field,
.form-group,
.mb-3 {
  margin-bottom: 1.25rem;
}

.form-control,
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  padding: 0.5rem 0.75rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-text {
  color: #6c757d;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* Custom button styling - applied to ALL buttons */
button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"],
a.btn,
button.btn {
  border-width: 1px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  position: relative !important;
  transition: box-shadow 0.2s ease !important;
  text-decoration: none !important;
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
a.btn:hover,
button.btn:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important;
}

button:active,
.btn:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active,
a.btn:active,
button.btn:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* Button color overrides with darker borders */
.btn-primary {
  border-color: #0062cc; /* Darker than the default primary */
}

.btn-secondary {
  border-color: #545b62; /* Darker than the default secondary */
}

.btn-success {
  border-color: #1e7e34; /* Darker than the default success */
}

.btn-danger {
  border-color: #bd2130; /* Darker than the default danger */
}

.btn-warning {
  border-color: #d39e00; /* Darker than the default warning */
}

.btn-info {
  border-color: #117a8b; /* Darker than the default info */
}

.btn-light {
  border-color: #c6c8ca; /* Darker than the default light */
}

.btn-dark {
  border-color: #1d2124; /* Darker than the default dark */
}

/* ========== Consistent Button System ========== */
/* Allow d-grid and w-100 to override inline-flex display */
.d-grid .btn-action,
.d-grid .btn-action-submit,
.d-grid .btn-action-danger,
.d-grid .btn-action-warning,
.btn-action.w-100,
.btn-action-submit.w-100,
.btn-action-danger.w-100,
.btn-action-warning.w-100 {
  display: flex;
  justify-content: center;
}

/* Base action button - gray solid, used for most buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(55 65 81) !important;
  background-color: rgb(243 244 246) !important;
  border: 1px solid rgb(209 213 219) !important;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-action:hover {
  background-color: rgb(229 231 235) !important;
  border-color: rgb(156 163 175) !important;
  color: rgb(55 65 81) !important;
}

.btn-action:active, .btn-action:focus, .btn-action:focus-visible {
  background-color: rgb(209 213 219) !important;
  border-color: rgb(156 163 175) !important;
  color: rgb(55 65 81) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  outline: none !important;
}

.btn-action.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.btn-action.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Danger action - gray base with red icon/text for destructive actions */
.btn-action-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc3545;
  background-color: rgb(243 244 246);
  border: 1px solid rgb(209 213 219) !important;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-action-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545 !important;
  color: #fff;
}

.btn-action-danger:active, .btn-action-danger:focus, .btn-action-danger:focus-visible {
  background-color: #bb2d3b !important;
  border-color: #bb2d3b !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  outline: none !important;
}

.btn-action-danger.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Warning action - gray base with orange text for caution actions */
.btn-action-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e67300;
  background-color: rgb(243 244 246);
  border: 1px solid rgb(209 213 219) !important;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-action-warning:hover {
  background-color: #e67300;
  border-color: #e67300 !important;
  color: #fff;
}

.btn-action-warning:active, .btn-action-warning:focus, .btn-action-warning:focus-visible {
  background-color: #cc6600 !important;
  border-color: #cc6600 !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  outline: none !important;
}

.btn-action-warning.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Submit action - green solid for primary form actions (Save, Create, Sign In) */
.btn-action-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background-color: #198754;
  border: 1px solid #146c43 !important;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-action-submit:hover {
  background-color: #146c43;
  border-color: #0f5132 !important;
  color: #fff;
}

.btn-action-submit:active, .btn-action-submit:focus, .btn-action-submit:focus-visible {
  background-color: #0f5132 !important;
  border-color: #0a3622 !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  outline: none !important;
}

.btn-action-submit.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

/* No need for special outline button styles, they're covered by the general button styles above */

/* Custom button spacing */
.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* Card styling improvements */
.card, 
.card-body, 
.card-header, 
.card-footer,
.container-fluid,
.container,
.row,
.col,
.alert {
  transition: none !important; /* Ensure no transitions on any container elements */
}

.card {
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.125);
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.75rem 1.25rem;
}

.card-header:first-child {
  border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.card-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.75rem 1.25rem;
}

.card-footer:last-child {
  border-radius: 0 0 calc(0.5rem - 1px) calc(0.5rem - 1px);
}

/* Custom table styles */
.table-responsive {
  margin-bottom: 1rem;
}

/* Alert styling improvements */
.alert {
  border-radius: 0.5rem;
  border-width: 1px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.25rem;
  position: relative;
}

.alert-dismissible {
  padding-right: 4rem !important; /* Make extra space for the close button */
}

.alert-dismissible .btn-close {
  position: absolute !important;
  top: 50% !important;
  right: 1rem !important;
  transform: translateY(-50%) !important;
  padding: 0.5rem !important;
  opacity: 0.7 !important;
  box-shadow: none !important; /* Remove drop shadow */
  border: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
}

.alert-dismissible .btn-close:hover {
  opacity: 1;
}

/* Navbar styling improvements */
.navbar {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-dark {
  background: linear-gradient(to right, #198754, #146c43);
}

.dropdown-menu {
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.dropdown-item {
  padding: 0.5rem 1.25rem;
  transition: background-color 0.15s ease-in-out;
}

/* Pulsing live indicator */
.pulse-live {
  animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Sticky footer styles */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  /* background-color removed - using custom.css background image instead */
  color: #333; /* Darker text for better readability */
}

main {
  flex: 1 0 auto;
  padding: 1.5rem 0; /* Add some vertical padding to main content */
}

/* Texture removed - using custom.css background image instead */

/* Improve container appearance */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  padding: 0 1.5rem;
}

/* Create nice containers for content */
.container-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: none; /* Ensure no transitions */
}

/* Special styling for the main container to create contrast */
/* Removed padding override - using Bootstrap's px-3 (16px) on mobile, px-4 (24px) on desktop */

footer {
  flex-shrink: 0;
}

/* Golf Scorecard Styling - Minimal styling, just circles */

/* Scorecard table styling with consistent border colors */
.scorecard-table {
  border-collapse: collapse;
}

.scorecard-table,
.scorecard-table th,
.scorecard-table td {
  border: 1px solid #777 !important; /* Medium gray border for all cells */
}

/* Special cell types */
.hole-column,
.player-name,
.header-label-column,
.spacer-cell,
.total-score,
.matchup-header td {
  border: 1px solid #777 !important; /* Ensure consistent borders for special cells */
}

/* Matchup header styling */
.matchup-header td {
  background-color: #f0f0f0; /* Light gray background for matchup headers */
}

.scorecard-table thead th {
  border-bottom: 1px solid #777 !important; /* Ensure header bottom border matches */
  background-color: #f0f0f0; /* Light gray background for header cells */
}

.scorecard-table-container {
  padding: 0; /* Remove extra padding around table */
  border-radius: 4px;
  overflow: hidden; /* Ensure rounded corners work properly */
}

/* Golf scorecard notations - Removed CSS circles in favor of inline SVG */
/* Score cells are styled in the scorecard partial */

/* Scorecard layout styles */
.scorecard-table {
  font-size: 0.85rem;
}

.scorecard-table td,
.scorecard-table th {
  vertical-align: middle !important;
}

.hole-column {
  min-width: 35px;
  max-width: 40px;
  padding: 4px 2px !important;
}

.header-label {
  border-left: 1px solid white !important;
}

.player-header {
  min-width: 120px;
  background-color: white;
}

.custom-borders .header-label {
  border-left: none !important;
}

.custom-borders .hole-column:first-of-type {
  border-left: none !important;
}

.custom-borders th:nth-child(2) {
  border-left: none !important;
}

.custom-borders td:nth-child(2) {
  border-left: none !important;
}

.custom-borders .player-name-cell {
  border-right: 1px solid white !important;
}

.custom-borders .team-name {
  border-right: 1px solid white !important;
}

.team-header-row {
  background-color: #f8f9fa;
  border-top: 2px solid rgb(119, 119, 119) !important;
}

.team-name {
  font-weight: bold;
  background-color: #f8f9fa;
  border-right: 1px solid white;
}

.player-name-cell {
  border-right: 1px solid white;
}

.invisible-cell {
  border-left: 1px solid white;
  color: transparent;
  font-size: 0;
}

.hole-win {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
  font-weight: bold;
}

.hole-tie {
  background-color: #fff3cd !important;
  color: #664d03 !important;
  font-weight: bold;
}

.net-winner {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.team-total {
  font-size: 1.1rem;
  background-color: #e9ecef;
}

.eagle-or-better {
  position: relative;
}

.birdie {
  position: relative;
}

.stroke-hole-header {
  background-color: white !important;
  outline: 2px solid #0d6efd !important;
  outline-offset: -1px !important;
}

@media (max-width: 576px) {
  .hole-column {
    min-width: 32px;
    max-width: 32px;
    padding: 3px 1px !important;
  }

  .player-name-cell,
  .team-name {
    min-width: auto;
    width: auto;
  }
}

/* Player Matchup Swapping UI */
.matchup-card {
  transition: all 0.3s ease;
}

.matchup-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.player-section {
  position: relative;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.matchup-swap-btn {
  margin-top: 0.5rem;
}