/* FridgeJam account and sync UI */

.account-btn.account-signed-in {
  background: #D7F5DF;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 9300;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.account-modal.hidden { display: none; }

.account-modal-panel {
  width: min(100%, 460px);
  max-height: 88vh;
  overflow-y: auto;
  background: #FAF7F0;
  border: 3px solid #25283D;
  border-radius: 20px;
  box-shadow: 8px 8px 0 rgba(37, 40, 61, 0.35);
  padding: 22px;
}

body.dark-theme .account-modal-panel {
  background: #1E2235;
  border-color: #A0B0CC;
}

.account-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-modal-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: #F2C078;
  border: 2px solid #25283D;
  border-radius: 12px;
  margin-bottom: 10px;
}

.account-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.account-modal-subtitle {
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
}

.account-modal-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 2px solid #25283D;
  border-radius: 12px;
  background: #D7F5DF;
  color: #25283D;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.account-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid #25283D;
  border-radius: 10px;
  background: #fff;
  color: #25283D;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 #25283D;
}

.account-auth-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-provider-btn,
.auth-guest-btn,
.auth-input-row button {
  min-height: 44px;
  border: 2px solid #25283D;
  border-radius: 12px;
  background: #fff;
  color: #25283D;
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 #25283D;
  transition: var(--transition-spring);
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
}

.auth-provider-btn:hover,
.auth-guest-btn:hover,
.auth-input-row button:hover,
.account-modal-close:hover {
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 #25283D;
}

.auth-provider-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #F7E7A8;
  font-weight: 900;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 2px;
  flex: 1;
  background: rgba(37, 40, 61, 0.22);
}

.auth-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-inline-form label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.auth-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.auth-input-row.hidden { display: none; }

.auth-input-row input {
  min-width: 0;
  min-height: 44px;
  border: 2px solid #25283D;
  border-radius: 12px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-weight: 700;
  background: #fff;
  color: #25283D;
}

.auth-input-row button {
  padding: 0 12px;
}

.auth-guest-btn {
  background: #FCE9EF;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid #25283D;
  border-radius: 14px;
  background: #D7F5DF;
}

.account-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25283D;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.account-display-name,
.account-display-email {
  margin: 0;
  color: #25283D;
}

.account-display-name {
  font-weight: 900;
}

.account-display-email {
  font-size: 0.82rem;
  opacity: 0.75;
}

.account-sync-list {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
}

.recipe-box-sync-prompt {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 2px solid #25283D;
  border-radius: 12px;
  background: #D7F5DF;
  color: #25283D;
  box-shadow: 3px 3px 0 #25283D;
}

.recipe-box-sync-title,
.recipe-box-sync-copy {
  margin: 0;
}

.recipe-box-sync-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
}

.recipe-box-sync-copy {
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 700;
  opacity: 0.78;
}

.recipe-box-sync-btn {
  min-height: 38px;
  white-space: nowrap;
  border: 2px solid #25283D;
  border-radius: 10px;
  background: #fff;
  color: #25283D;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #25283D;
}

.recipe-box-sync-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 #25283D;
}

body.dark-theme .auth-provider-btn,
body.dark-theme .auth-guest-btn,
body.dark-theme .auth-input-row input,
body.dark-theme .auth-input-row button,
body.dark-theme .account-modal-close,
[data-theme="dark"] .recipe-box-sync-prompt,
body.dark-theme .account-modal-note {
  border-color: #A0B0CC;
  box-shadow: 3px 3px 0 #A0B0CC;
}

@media (max-width: 520px) {
  .recipe-box-sync-prompt {
    grid-template-columns: 1fr;
  }

  .recipe-box-sync-btn {
    width: 100%;
  }
}
