form {
  margin-bottom: 30px;
}

input[type="date"] {
  padding: 8px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  margin-right: 10px;
}

button {
  padding: 8px 15px;
  font-size: 16px;
  background-color: #26292e;
  color: #737f8a;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

input[type="text"] {
    padding: 8px 15px;
    font-size: 16px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 5px;
}

button:hover {
  background-color: #036096;
  color: #fff;
}

.countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.time {
  background: #1f1f1f;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  min-width: 100px;
}

.time span {
  display: block;
  font-size: 2em;
  font-weight: bold;
  color: #036096;
}

.expired {
  font-size: 1.5em;
  color: #ff4d4d;
}

a {
  color: #036096;
  text-decoration: none;
}

#loading {
    display: none; /* Hidden by default */
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1006;
    /* Flexbox Centering (MUST be here, not just in .active) */
    display: flex; /* ⚠️ Keep this even if using jQuery .show() */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(2px);
}

/* Remove the .active class selector since we're using show() */
#loading::before {
    content: '';
    display: block;
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#loading::after {
    content: 'Cargando. Espere por favor.';
    display: block;
    color: white;
    font-size: clamp(14px, 3vw, 16px);
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 300;
    max-width: 80vw;
    text-align: center;
    padding: 0 20px;
    line-height: 1.4;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #loading {
        gap: 15px;
    }
    
    #loading::after {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    #loading {
        gap: 12px;
        backdrop-filter: blur(1px);
    }
    
    #loading::before {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    #loading::after {
        font-size: 14px;
        max-width: 90vw;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion) {
    #loading::before {
        animation: spin 2s linear infinite;
    }
}