/* SAUVEGARDE DES DONNÉES — Google Drive (sauvegarde-google.js) */

.gd-derniere {
  margin: 8px 0 0;
  color: #374151;
  font-size: 13px;
}

.gd-derniere:empty {
  display: none;
}

.gd-derniere.gd-alerte {
  color: #b45309;
  font-weight: 600;
}

.gd-auto {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #1f2937;
  font-size: 13.5px;
  cursor: pointer;
}

.gd-auto input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.gd-auto.gd-inactif {
  opacity: .5;
  cursor: not-allowed;
}

.gd-liste {
  width: 100%;
  margin: -4px 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.gd-liste[hidden] {
  display: none;
}

.gd-liste-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 14px;
}

.gd-fermer {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #eef0f3;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.gd-vide {
  margin: 0;
  padding: 14px;
  color: #6b7280;
  font-size: 13.5px;
}

.gd-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f1f3;
}

.gd-ligne:last-child {
  border-bottom: 0;
}

.gd-infos {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 14px;
}

.gd-infos > span {
  color: #6b7280;
  font-size: 12.5px;
}

.gd-type {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  background: #e9eef8;
  color: #1f3a68;
  font-size: 11.5px;
  font-weight: 700;
}

.gd-type-auto { background: #dcfce7; color: #166534; }
.gd-type-avant-restauration { background: #fef3c7; color: #92400e; }
.gd-type-ancienne { background: #f3f4f6; color: #4b5563; }

.gd-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.gd-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gd-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.gd-btn.gd-principal {
  border-color: #1f3a68;
  background: #1f3a68;
  color: #fff;
}

.gd-btn.gd-danger {
  color: #b42318;
}

/* Bandeau « sauvegarde du jour » */
.gd-bandeau {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  font-size: 14px;
}

.gd-bandeau[hidden] {
  display: none;
}

.gd-bandeau-texte {
  flex: 1 1 220px;
  color: #1f2937;
}

@media (max-width: 560px) {
  .gd-ligne {
    flex-direction: column;
    align-items: stretch;
  }

  .gd-actions .gd-principal {
    flex: 1;
  }
}

/* Carte Google Drive : boutons en colonne pour laisser de la place au texte */
.invoice-settings-google-card .invoice-settings-drive-actions {
  flex: 0 0 220px;
  flex-direction: column;
  align-items: stretch;
  margin-top: 0;
}

#invoice-drive-account {
  display: block;
  margin-top: 6px;
  color: #374151;
  font-size: 13px;
  word-break: break-all;
}

#invoice-drive-account[hidden] {
  display: none;
}

@media (max-width: 650px) {
  .invoice-settings-google-card .invoice-settings-drive-actions {
    flex: 1 1 auto;
    width: 100%;
  }
}
