/*
 * 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 */
}

/* 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;
}

/* 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 */

/* 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;
}