/**
 * Google Chrome Password Manager Floating Popup
 * Authentic Chrome / Google Password Manager Design System
 */

.g-pwd-dialog-overlay {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Google Sans", Helvetica, Arial, sans-serif;
  pointer-events: none;
  animation: gPwdSlideDown 0.32s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes gPwdSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.g-pwd-dialog {
  pointer-events: auto;
  width: 360px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 20px 28px -4px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08);
  padding: 20px 22px 18px;
  color: #1f1f1f;
  position: relative;
  box-sizing: border-box;
}

/* Chrome Address-Bar Little Arrow / Bubble Stem */
.g-pwd-dialog::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 32px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  transform: rotate(45deg);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.g-pwd-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.g-pwd-logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
}

.g-pwd-title-wrap {
  flex-grow: 1;
}

.g-pwd-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: #1f1f1f;
  line-height: 1.3;
  margin: 0;
}

.g-pwd-subtitle {
  font-size: 0.82rem;
  color: #5f6368;
  margin-top: 3px;
  line-height: 1.35;
}

.g-pwd-close-btn {
  background: transparent;
  border: none;
  color: #5f6368;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.g-pwd-close-btn:hover {
  background-color: #f1f3f4;
  color: #202124;
}

/* Body / Credential Preview */
.g-pwd-body {
  background: #f8fafd;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.g-pwd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.86rem;
}

.g-pwd-row:not(:last-child) {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.g-pwd-label {
  color: #5f6368;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-pwd-val {
  font-weight: 500;
  color: #1f1f1f;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-pwd-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.g-pwd-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.g-pwd-btn-cancel {
  background: transparent;
  border: 1px solid #dadce0;
  color: #1a73e8;
}

.g-pwd-btn-cancel:hover {
  background: #f8fafd;
  border-color: #d2e3fc;
}

.g-pwd-btn-save {
  background: #1a73e8;
  border: 1px solid #1a73e8;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.g-pwd-btn-save:hover {
  background: #1557d4;
  border-color: #1557d4;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

/* Success Saved State */
.g-pwd-success {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #137333;
  font-size: 0.90rem;
  font-weight: 500;
  padding: 6px 0;
}

@media (max-width: 576px) {
  .g-pwd-dialog-overlay {
    top: 10px;
    right: 12px;
    left: 12px;
  }
  .g-pwd-dialog {
    width: 100%;
  }
}
