/* === style.css === 
   Zachowano tylko style wymagane przez logikę JS i specyficzne elementy.
   Reszta stylów jest obsługiwana przez Tailwind CSS w index.php.
*/

/* --- Walidacja JS (cf-valid/cf-invalid) --- */
/* Nadpisuje style inputów Tailwinda w przypadku walidacji */

input.cf-invalid,
select.cf-invalid {
  border-color: #dc2626 !important; /* text-red-600 */
  box-shadow: 0 0 0 1px #dc2626 !important;
}

input.cf-valid,
select.cf-valid {
  border-color: #10b981 !important; /* text-emerald-500 */
  box-shadow: 0 0 0 1px #10b981 !important;
}

/* Walidacja banku error message */
.cf-error {
  display: none;
}
.cf-error.active {
  display: block;
}

/* --- Tooltip "Taka sama rata" --- */
.tooltip-match {
  position: relative;
  width: 100%;
  text-align: center;
  margin-top: 6px;
  display: none;
}

.tooltip-match.active {
  display: block;
  animation: fadeSlide 0.25s ease-out;
}

.tooltip-match .box {
  display: inline-block;
  background: #202833;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Stopka (Footer Toggle logic) --- */
/* Klasa .open dodawana przez JS */
.footer-content {
  transition:
    max-height 0.4s ease,
    opacity 0.4s ease;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
}
.footer-content.open {
  opacity: 1;
  max-height: 1000px; /* Arbitrary large height for animation */
}
.footer-toggle {
  cursor: pointer;
  user-select: none;
}

/* --- Custom Range Slider (Premium InvestLean) --- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background-color: #e2e8f0; /* slate-200 */
  border-radius: 5px;
  background-image: linear-gradient(#10b981, #10b981);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  cursor: pointer;
  outline: none;
}

/* Dark mode support for range background */
.dark input[type="range"] {
  background-color: #334155; /* slate-700 */
}

/* Thumb Styling (Chrome, Safari, Edge, Opera) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #10b981;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.1s ease,
    border-color 0.2s;
  margin-top: -2px; /* Center thumb on track if needed, but height/appearance usually handles it */
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  border-color: #059669; /* primary-hover */
}

/* Thumb Styling (Firefox) */
input[type="range"]::-moz-range-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #10b981;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  border-color: #059669;
}

/* --- Custom Scrollbar for Logo Grid --- */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* slate-300 */
  border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #475569; /* slate-600 */
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* slate-400 */
}

/* --- Zaawansowane wyróżnienie wybranego banku --- */
.bank-logo-grid:has(input:checked) label:not(:has(input:checked)) .bank-logo-card {
  opacity: 0.3;
  filter: grayscale(1) brightness(0.9);
  border-color: transparent !important;
}

/* Stan zaznaczony - priorytet */
label:has(input:checked) .bank-logo-card {
  opacity: 1 !important;
  filter: grayscale(0) brightness(1) !important;
  transform: scale(1.03);
  z-index: 10;
  border-color: #10b981 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* --- Visual Lock Overlay --- */
.visual-lock-container {
  position: relative;
}

.visual-lock-overlay {
  position: absolute;
  inset: -1rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.dark .visual-lock-overlay {
  background: rgba(15, 23, 42, 0.4);
}

.visual-lock-overlay.hidden-lock {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

@keyframes pulse-subtle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.01); opacity: 0.95; box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
}

.animate-pulse-bank {
  animation: pulse-subtle 2s infinite ease-in-out;
}
