/* ===================================================
   STUDIO ESM — APPAREILS DE CONFIANCE (ISOLÉ)
   Toutes les classes sont strictement préfixées .trusted-device-
   =================================================== */

.trusted-device-modal {
  border: 1px solid rgba(91, 58, 41, 0.15);
  border-radius: 20px;
  padding: 24px;
  background: var(--cream, #fffdfa);
  color: var(--espresso, #2d2420);
  box-shadow: 0 20px 40px rgba(45, 36, 32, 0.2);
  width: 92%;
  max-width: 480px;
  box-sizing: border-box;
}

.trusted-device-modal::backdrop {
  background: rgba(45, 36, 32, 0.6);
  backdrop-filter: blur(4px);
}

.trusted-device-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.trusted-device-title {
  margin: 0;
  font-family: var(--font-title, "Playfair Display", Georgia, serif);
  font-size: 18px;
  color: var(--espresso, #2d2420);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trusted-device-desc {
  font-size: 13px;
  color: var(--ink, #4a3e39);
  line-height: 1.4;
  margin: 0 0 16px 0;
  opacity: 0.85;
}

.trusted-device-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 18px;
}

.trusted-device-item {
  background: rgba(91, 58, 41, 0.04);
  border: 1px solid rgba(91, 58, 41, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.trusted-device-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trusted-device-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--espresso, #2d2420);
  display: flex;
  align-items: center;
  gap: 6px;
}

.trusted-device-meta {
  font-size: 12px;
  color: var(--ink, #4a3e39);
  opacity: 0.75;
}

.trusted-device-badge-current {
  background: #e7eadc;
  color: #3b5030;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
}

.trusted-device-badge-status {
  color: #b72b2b;
  font-size: 11px;
  font-weight: 600;
}

.trusted-device-revoke-btn {
  background: none;
  border: 1px solid #b72b2b;
  color: #b72b2b;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 34px;
  white-space: nowrap;
}

.trusted-device-revoke-btn:hover {
  background: #fbeae8;
}

.trusted-device-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.trusted-device-input-wrap {
  margin-bottom: 16px;
}

.trusted-device-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--espresso, #2d2420);
  margin-bottom: 6px;
}

.trusted-device-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(91, 58, 41, 0.2);
  background: #fff;
  font-size: 16px; /* anti-zoom iOS */
  color: var(--espresso, #2d2420);
}

.trusted-device-input:focus {
  outline: none;
  border-color: var(--terracotta, #b85d38);
  box-shadow: 0 0 0 3px rgba(184, 93, 56, 0.15);
}

/* Responsiveness */
@media (max-width: 480px) {
  .trusted-device-modal {
    width: calc(100vw - 24px);
    padding: 18px 16px;
  }
  .trusted-device-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .trusted-device-revoke-btn {
    align-self: flex-end;
    width: 100%;
    text-align: center;
  }
}
