/* global variables for generic styling */
:root {
  --border-light: rgba(255,255,255,0.05);
  --company-primary: #10b981;
  --company-secondary: #38bdf8;
  --company-surface-glow: rgba(16, 185, 129, 0.12);
}

body {
  background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.95)), url('../img/fondo_prodematic.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a; 
}
::-webkit-scrollbar-thumb {
  background: #334155; 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569; 
}

/* Hide scrollbar utility */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.border-light-divider {
  border-color: var(--border-light);
}

/* Inputs styling override for autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Prediction Input Number Hide Arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Animations & Transitions */
.view-section {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card {
  transition: all 0.2s ease-in-out;
}
.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.toast {
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Carousel Specific Styles */
.carousel-item {
  display: none;
}
.carousel-item.active {
  display: block;
}

#carousel-container .carousel-item {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s ease-in-out;
}
}

.driver-overlay path {
  fill: rgba(2, 6, 23, 0.34) !important;
}

.driver-popover.prodematic-tour-popover {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow:
    0 28px 70px rgba(2, 6, 23, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  max-width: 360px;
}

.driver-popover.prodematic-tour-popover .driver-popover-title {
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.driver-popover.prodematic-tour-popover .driver-popover-description {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.driver-popover.prodematic-tour-popover .driver-popover-progress-text {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-popover.prodematic-tour-popover .driver-popover-footer {
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.driver-popover.prodematic-tour-popover .driver-popover-navigation-btns {
  gap: 0.6rem;
}

.driver-popover.prodematic-tour-popover .driver-popover-prev-btn,
.driver-popover.prodematic-tour-popover .driver-popover-next-btn {
  appearance: none;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: none;
  box-shadow: none;
  transition: all 0.2s ease;
}

.driver-popover.prodematic-tour-popover .driver-popover-prev-btn {
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
}

.driver-popover.prodematic-tour-popover .driver-popover-prev-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
}

.driver-popover.prodematic-tour-popover .driver-popover-next-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.35);
  color: #f0fdf4;
}

.driver-popover.prodematic-tour-popover .driver-popover-next-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.driver-popover.prodematic-tour-popover .driver-popover-close-btn {
  width: 2rem;
  height: 2rem;
  top: 0.8rem;
  right: 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.driver-popover.prodematic-tour-popover .driver-popover-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.driver-popover.prodematic-tour-popover .driver-popover-arrow {
  color: rgba(15, 23, 42, 0.98) !important;
}

.driver-popover.prodematic-tour-popover .driver-popover-arrow-side-top {
  border-top-color: rgba(15, 23, 42, 0.98) !important;
}

.driver-popover.prodematic-tour-popover .driver-popover-arrow-side-bottom {
  border-bottom-color: rgba(15, 23, 42, 0.98) !important;
}

.driver-popover.prodematic-tour-popover .driver-popover-arrow-side-left {
  border-left-color: rgba(15, 23, 42, 0.98) !important;
}

.driver-popover.prodematic-tour-popover .driver-popover-arrow-side-right {
  border-right-color: rgba(15, 23, 42, 0.98) !important;
}

.driver-active-element {
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 12px rgba(16, 185, 129, 0.22),
    0 0 40px rgba(16, 185, 129, 0.12),
    0 20px 40px rgba(2, 6, 23, 0.22) !important;
}

body.company-theme {
  background-image:
    radial-gradient(circle at top right, color-mix(in srgb, var(--company-primary) 18%, transparent), transparent 42%),
    radial-gradient(circle at bottom left, color-mix(in srgb, var(--company-secondary) 16%, transparent), transparent 45%);
}

body.company-theme .company-surface {
  box-shadow: 0 20px 60px var(--company-surface-glow);
}

/* Bug Report FAB Animation */
#bug-report-fab {
    animation: pulse-bug 4s infinite;
}

@media (max-width: 767px) {
    #donation-fab,
    #install-app-fab,
    #bug-report-fab {
        right: 1.25rem;
    }

    #donation-fab {
        bottom: 8.5rem;
    }

    #install-app-fab {
        bottom: 13rem !important;
    }

    #bug-report-fab {
        bottom: 17.5rem;
    }

    #pwa-install-mobile-wrapper {
        right: 1.5rem;
        left: auto;
    }
}

@keyframes pulse-bug {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(249, 115, 22, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}
/* Autosave Status Indicators */
.autosave-status {
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.autosave-saving {
    color: #94a3b8; /* slate-400 */
}

.autosave-saved {
    color: #10b981; /* brand-500 */
}

.autosave-error {
    color: #ef4444; /* red-500 */
}

.spinner-mini {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
