/**
 * ============================================
 * STYLES POUR LA GESTION DES QUOTAS
 * ============================================
 */

/* Overlay principal */
.quota-wait-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quota-wait-overlay.show {
  opacity: 1;
}

/* Contenu de la modal */
.quota-wait-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Icône */
.quota-wait-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Titre */
.quota-wait-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: white;
}

/* Description */
.quota-wait-description {
  font-size: 16px;
  margin: 0 0 30px 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Conteneur de la barre de progression */
.quota-wait-progress-container {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

/* Barre de progression */
.quota-wait-progress-bar {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 0.1s linear;
  position: relative;
  overflow: hidden;
}

.quota-wait-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Timer */
.quota-wait-timer {
  font-size: 48px;
  font-weight: 700;
  color: white;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Message d'information sur le quota */
.quota-info {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  max-width: 350px;
}

.quota-info.show {
  opacity: 1;
  transform: translateX(0);
}

.quota-info-icon {
  font-size: 24px;
}

.quota-info-text {
  font-size: 14px;
  line-height: 1.4;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  .quota-wait-overlay {
    background: rgba(0, 0, 0, 0.85);
  }
}

/* ============================================ */
/* MODAL D'ERREUR QUOTA DÉPASSÉ */
/* ============================================ */

.quota-exceeded-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quota-exceeded-overlay.show {
  opacity: 1;
}

.quota-exceeded-modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInQuota 0.3s ease;
}

@keyframes slideInQuota {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.quota-exceeded-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.quota-exceeded-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: #e74c3c;
}

.quota-exceeded-description {
  font-size: 15px;
  color: #555;
  margin: 0 0 30px 0;
  line-height: 1.6;
}

.quota-exceeded-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.quota-exceeded-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

.quota-exceeded-btn.close-btn {
  background: #95a5a6;
  color: white;
}

.quota-exceeded-btn.close-btn:hover {
  background: #7f8c8d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quota-exceeded-btn.refresh-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.quota-exceeded-btn.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.quota-exceeded-btn.refresh-btn:active {
  transform: translateY(0);
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  .quota-exceeded-modal {
    background: #2a2a2a;
    color: #fff;
  }

  .quota-exceeded-title {
    color: #ff6b6b;
  }

  .quota-exceeded-description {
    color: #ccc;
  }

  .quota-exceeded-btn.close-btn {
    background: #555;
  }

  .quota-exceeded-btn.close-btn:hover {
    background: #666;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .quota-exceeded-modal {
    padding: 30px 20px;
  }

  .quota-exceeded-icon {
    font-size: 48px;
  }

  .quota-exceeded-title {
    font-size: 22px;
  }

  .quota-exceeded-description {
    font-size: 14px;
  }

  .quota-exceeded-buttons {
    flex-direction: column;
  }

  .quota-exceeded-btn {
    min-width: 100%;
  }
}


@media (max-width: 600px) {
  .quota-wait-content {
    padding: 30px 20px;
  }

  .quota-wait-icon {
    font-size: 48px;
  }

  .quota-wait-title {
    font-size: 20px;
  }

  .quota-wait-description {
    font-size: 14px;
  }

  .quota-wait-timer {
    font-size: 36px;
  }

  .quota-info {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
