/* =========================================
   PrintCraft — My Pet profile widget
   ========================================= */

.my-pet-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.my-pet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--primary);
  color: #f5f0e6;
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 58, 42, 0.25);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.my-pet-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 58, 42, 0.35);
}

.my-pet-pill.has-profile {
  background: #f5f0e6;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 20px rgba(26, 58, 42, 0.18);
}

.my-pet-pill-breed {
  font-weight: 500;
}

.my-pet-pill-edit {
  margin-left: 4px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.my-pet-widget.open .my-pet-pill {
  display: none;
}

.my-pet-drawer {
  display: none;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(26, 58, 42, 0.2);
  overflow: hidden;
}

.my-pet-widget.open .my-pet-drawer {
  display: block;
}

.my-pet-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--primary);
  color: #f5f0e6;
}

.my-pet-drawer-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.my-pet-close {
  background: transparent;
  border: none;
  color: #f5f0e6;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
}

.my-pet-close:hover {
  color: var(--accent);
}

.my-pet-drawer-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-pet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-weight: 500;
}

.my-pet-field span {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.my-pet-field input,
.my-pet-field select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--fg);
  width: 100%;
}

.my-pet-field input:focus,
.my-pet-field select:focus {
  outline: none;
  border-color: var(--primary);
}

.my-pet-field select:disabled {
  background: var(--bg-alt);
  color: var(--fg-muted);
  cursor: not-allowed;
}

.my-pet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.my-pet-save {
  flex: 1;
  padding: 10px 14px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s;
}

.my-pet-save:hover {
  background: #c84d12;
  transform: translateY(-1px);
}

.my-pet-delete {
  padding: 10px 14px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.my-pet-delete:hover {
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 480px) {
  .my-pet-widget {
    bottom: 14px;
    right: 14px;
  }
  .my-pet-drawer {
    width: calc(100vw - 28px);
  }
}
