/* ==========================================================================
   PintoLotto Web Application - Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Global Styles & Typography
   -------------------------------------------------------------------------- */
body {
  background-color: #f8f9fa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Layout & Containers
   -------------------------------------------------------------------------- */
.app-container {
  width: 95%;
  max-width: 1600px;
  margin: 0 auto;
}

.tab-content {
  min-height: 60vh;
}

/* --------------------------------------------------------------------------
   3. Authentication (Login View)
   -------------------------------------------------------------------------- */
.login-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

#passwordInput {
  padding-left: 40px;
  border-radius: 8px;
}

.eye-icon-wrapper {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  color: #adb5bd;
  transition: color 0.2s ease;
}

.eye-icon-wrapper:hover {
  color: #495057;
}

.logout-icon:hover {
  color: #343a40 !important;
}

/* --------------------------------------------------------------------------
   4. Tables (DataTables Overrides)
   -------------------------------------------------------------------------- */
#lottoDataTable th,
#lottoDataTable td {
  text-align: center !important;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   5. Lotto Visual Components (Balls & Grids)
   -------------------------------------------------------------------------- */
.lotto-ball {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #f1c40f;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.2);
}

.lotto-ball-strong {
  background-color: #dc3545;
  color: #fff;
}

/* Regular Numbers Grid */
.lotto-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  direction: ltr; /* Keeps numbers strictly LTR even in Hebrew UI */
}

.lotto-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid #dee2e6;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.lotto-cell.empty {
  background-color: transparent;
  border-color: transparent;
  cursor: default;
}

.lotto-cell.selected {
  background-color: #f1c40f;
  border-color: #f1c40f;
  color: #000;
}

.lotto-cell:hover:not(.empty):not(.selected) {
  border-color: #f1c40f;
}

/* Strong Numbers Grid */
.strong-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  direction: ltr;
}

.strong-cell {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #dc3545;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.strong-cell.selected {
  background-color: #dc3545;
  color: #fff;
}

.strong-cell:hover:not(.selected) {
  background-color: #f8d7da;
}

/* --------------------------------------------------------------------------
   6. Form & Input Resets (Hiding defaults, fixing UI behaviors)
   -------------------------------------------------------------------------- */
/* Hide the numeric up/down arrows in number inputs */
.custom-number-input::-webkit-inner-spin-button,
.custom-number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-number-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* --------------------------------------------------------------------------
   7. Bootstrap Overrides (Focus, Active States & Shadows)
   Goal: Maintain a clean UI without default Bootstrap glowing borders
   -------------------------------------------------------------------------- */
.form-control:focus,
.form-select:focus,
.btn:focus,
.btn-check:focus + .btn,
.form-check-input:focus,
.accordion-button:focus {
  box-shadow: none !important;
  border-color: #0d6efd !important;
}

/* Link Buttons Reset */
.btn-link,
.btn-link:focus,
.btn-link:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Outline Buttons Base Reset */
.btn-outline-success:focus,
.btn-outline-success:active,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-danger:focus,
.btn-outline-danger:active {
  box-shadow: none !important;
  outline: none !important;
}

/* Specific Border Colors for Outline Buttons */
.btn-outline-success:focus,
.btn-outline-success:active {
  border-color: #198754 !important;
}

.btn-outline-danger:focus,
.btn-outline-danger:active {
  border-color: #dc3545 !important;
}
