/* APC_PRIVATE_PROFILE_VISUAL_POLISH_R12J_START */

.private-shell[data-private-page="profile"] {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.private-shell[data-private-page="profile"] .private-hero {
  border: 1px solid rgba(102, 126, 234, 0.22);
  border-radius: 1.35rem;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background:
    radial-gradient(circle at top left, rgba(102, 126, 234, 0.18), transparent 34rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
  box-shadow: 0 18px 45px rgba(18, 38, 63, 0.10);
}

.private-shell[data-private-page="profile"] .private-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.04em;
  color: #18233f;
}

.private-shell[data-private-page="profile"] .private-hero p {
  margin: 0;
  max-width: 70ch;
  color: #526079;
  font-size: 1rem;
  line-height: 1.55;
}

.private-shell[data-private-page="profile"] .private-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

.private-shell[data-private-page="profile"] .private-grid > *,
.private-shell[data-private-page="profile"] .private-card,
.private-shell[data-private-page="profile"] .profile-card,
.private-shell[data-private-page="profile"] .apc-anki-minimal-card,
.private-shell[data-private-page="profile"] .apc-profile-local-backups-panel,
.private-shell[data-private-page="profile"] [data-apc-profile-local-backups-panel="true"],
.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"],
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(99, 115, 146, 0.18);
  border-radius: 1.25rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(18, 38, 63, 0.09);
  color: #1f2a44;
}

.private-shell[data-private-page="profile"] .private-grid > *:hover,
.private-shell[data-private-page="profile"] .private-card:hover,
.private-shell[data-private-page="profile"] .profile-card:hover {
  border-color: rgba(102, 126, 234, 0.28);
  box-shadow: 0 18px 44px rgba(18, 38, 63, 0.13);
}

.private-shell[data-private-page="profile"] h2,
.private-shell[data-private-page="profile"] h3 {
  margin: 0 0 0.75rem;
  color: #18233f;
  letter-spacing: -0.025em;
}

.private-shell[data-private-page="profile"] h2 {
  font-size: 1.35rem;
}

.private-shell[data-private-page="profile"] h3 {
  font-size: 1.18rem;
}

.private-shell[data-private-page="profile"] p,
.private-shell[data-private-page="profile"] li,
.private-shell[data-private-page="profile"] small,
.private-shell[data-private-page="profile"] label {
  color: #526079;
  line-height: 1.55;
}

.private-shell[data-private-page="profile"] p {
  margin: 0.45rem 0;
}

.private-shell[data-private-page="profile"] strong {
  color: #263451;
}

.private-shell[data-private-page="profile"] .profile-preference-row,
.private-shell[data-private-page="profile"] .private-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(99, 115, 146, 0.12);
}

.private-shell[data-private-page="profile"] .profile-preference-row:last-child,
.private-shell[data-private-page="profile"] .private-row:last-child {
  border-bottom: 0;
}

.private-shell[data-private-page="profile"] .private-actions,
.private-shell[data-private-page="profile"] .profile-actions,
.private-shell[data-private-page="profile"] .apc-google-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.private-shell[data-private-page="profile"] button,
.private-shell[data-private-page="profile"] .private-button,
.private-shell[data-private-page="profile"] input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 750;
  background: linear-gradient(135deg, #667eea, #65d6a6);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(102, 126, 234, 0.22);
}

.private-shell[data-private-page="profile"] button:hover,
.private-shell[data-private-page="profile"] .private-button:hover,
.private-shell[data-private-page="profile"] input[type="file"]::file-selector-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.private-shell[data-private-page="profile"] button:disabled,
.private-shell[data-private-page="profile"] input[type="file"]:disabled::file-selector-button {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.25);
  box-shadow: none;
}

.private-shell[data-private-page="profile"] input[type="file"] {
  max-width: 100%;
  padding: 0.75rem;
  border: 1px dashed rgba(99, 115, 146, 0.32);
  border-radius: 1rem;
  background: rgba(247, 250, 255, 0.82);
  color: #526079;
}

.private-shell[data-private-page="profile"] details {
  margin: 0.75rem 0;
  border: 1px solid rgba(99, 115, 146, 0.16);
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(247, 250, 255, 0.74);
}

.private-shell[data-private-page="profile"] summary {
  cursor: pointer;
  font-weight: 750;
  color: #263451;
}

.private-shell[data-private-page="profile"] code {
  border-radius: 0.45rem;
  padding: 0.12rem 0.35rem;
  background: rgba(102, 126, 234, 0.10);
  color: #263451;
}

.private-shell[data-private-page="profile"] pre,
.private-shell[data-private-page="profile"] [data-apc-local-backup-status] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0.85rem 0 0;
  min-height: 2.8rem;
  border: 1px solid rgba(99, 115, 146, 0.14);
  border-radius: 1rem;
  padding: 0.85rem;
  background: #f7faff;
  color: #526079;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.private-shell[data-private-page="profile"] .apc-profile-local-backups-panel strong,
.private-shell[data-private-page="profile"] .apc-anki-file-location-help strong {
  color: #33415f;
}

@media (max-width: 860px) {
  .private-shell[data-private-page="profile"] {
    width: min(100%, calc(100vw - 20px));
    padding-top: 0.75rem;
  }

  .private-shell[data-private-page="profile"] .private-grid {
    grid-template-columns: 1fr;
  }

  .private-shell[data-private-page="profile"] .profile-preference-row,
  .private-shell[data-private-page="profile"] .private-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .private-shell[data-private-page="profile"] button,
  .private-shell[data-private-page="profile"] .private-button {
    width: 100%;
  }
}

/* APC_PRIVATE_PROFILE_VISUAL_POLISH_R12J_END */


/* APC_PRIVATE_PROFILE_LOCAL_BACKUPS_VISIBLE_R12L_R2_START */
.private-shell[data-private-page="profile"] .apc-profile-local-backups-panel,
.private-shell[data-private-page="profile"] [data-apc-profile-local-backups-panel="true"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 0 !important;
}

.private-shell[data-private-page="profile"] .apc-local-backup-short-copy {
  margin: 0.25rem 0 0.9rem !important;
  font-size: 1rem !important;
  color: #526079 !important;
}
/* APC_PRIVATE_PROFILE_LOCAL_BACKUPS_VISIBLE_R12L_R2_END */


/* APC_PRIVATE_PROFILE_GOOGLE_SYNC_VISUAL_POLISH_R12M_START */

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"],
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"],
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel,
.private-shell[data-private-page="profile"] .apc-google-sync-panel,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel,
.private-shell[data-private-page="profile"] .profile-google-sync-panel,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"],
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"],
.private-shell[data-private-page="profile"] [id*="google"][id*="sync"],
.private-shell[data-private-page="profile"] [id*="drive"][id*="sync"] {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid rgba(99, 115, 146, 0.18) !important;
  border-radius: 1.25rem !important;
  padding: clamp(1rem, 2vw, 1.35rem) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 34px rgba(18, 38, 63, 0.09) !important;
  color: #1f2a44 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] h2,
.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] h3,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] h2,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] h3,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel h2,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel h3,
.private-shell[data-private-page="profile"] .apc-google-sync-panel h2,
.private-shell[data-private-page="profile"] .apc-google-sync-panel h3,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel h2,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel h3,
.private-shell[data-private-page="profile"] .profile-google-sync-panel h2,
.private-shell[data-private-page="profile"] .profile-google-sync-panel h3,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] h2,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] h3,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] h2,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] h3 {
  margin: 0 0 0.7rem !important;
  color: #18233f !important;
  letter-spacing: -0.025em !important;
  font-size: 1.18rem !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] p,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] p,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel p,
.private-shell[data-private-page="profile"] .apc-google-sync-panel p,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel p,
.private-shell[data-private-page="profile"] .profile-google-sync-panel p,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] p,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] p {
  margin: 0.45rem 0 !important;
  color: #526079 !important;
  line-height: 1.55 !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] label,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] label,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel label,
.private-shell[data-private-page="profile"] .apc-google-sync-panel label,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel label,
.private-shell[data-private-page="profile"] .profile-google-sync-panel label,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] label,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] label {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 0.7rem !important;
  align-items: start !important;
  margin: 0.9rem 0 !important;
  padding: 0.9rem !important;
  border: 1px solid rgba(102, 126, 234, 0.18) !important;
  border-radius: 1rem !important;
  background: rgba(247, 250, 255, 0.86) !important;
  color: #526079 !important;
  line-height: 1.5 !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] input[type="checkbox"],
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] input[type="checkbox"],
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel input[type="checkbox"],
.private-shell[data-private-page="profile"] .apc-google-sync-panel input[type="checkbox"],
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel input[type="checkbox"],
.private-shell[data-private-page="profile"] .profile-google-sync-panel input[type="checkbox"],
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] input[type="checkbox"],
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] input[type="checkbox"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  margin-top: 0.18rem !important;
  accent-color: #667eea !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] small,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] small,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel small,
.private-shell[data-private-page="profile"] .apc-google-sync-panel small,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel small,
.private-shell[data-private-page="profile"] .profile-google-sync-panel small,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] small,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] small {
  display: block !important;
  margin-top: 0.7rem !important;
  padding: 0.75rem 0.85rem !important;
  border-radius: 0.9rem !important;
  background: rgba(102, 126, 234, 0.08) !important;
  color: #526079 !important;
  line-height: 1.45 !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] strong,
.private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] strong,
.private-shell[data-private-page="profile"] .apc-google-sync-profile-panel strong,
.private-shell[data-private-page="profile"] .apc-google-sync-panel strong,
.private-shell[data-private-page="profile"] .apc-google-drive-sync-panel strong,
.private-shell[data-private-page="profile"] .profile-google-sync-panel strong,
.private-shell[data-private-page="profile"] [class*="google"][class*="sync"] strong,
.private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] strong {
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0.35rem 0 0.2rem !important;
  padding: 0.32rem 0.65rem !important;
  border-radius: 999px !important;
  background: rgba(101, 214, 166, 0.16) !important;
  color: #23634d !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.01em !important;
}

@media (max-width: 860px) {
  .private-shell[data-private-page="profile"] [data-apc-google-sync-profile-panel="true"] label,
  .private-shell[data-private-page="profile"] [data-apc-google-sync-panel="true"] label,
  .private-shell[data-private-page="profile"] .apc-google-sync-profile-panel label,
  .private-shell[data-private-page="profile"] .apc-google-sync-panel label,
  .private-shell[data-private-page="profile"] .apc-google-drive-sync-panel label,
  .private-shell[data-private-page="profile"] .profile-google-sync-panel label,
  .private-shell[data-private-page="profile"] [class*="google"][class*="sync"] label,
  .private-shell[data-private-page="profile"] [class*="drive"][class*="sync"] label {
    grid-template-columns: 1fr !important;
  }
}

/* APC_PRIVATE_PROFILE_GOOGLE_SYNC_VISUAL_POLISH_R12M_END */


/* APC_PRIVATE_PROFILE_GOOGLE_SYNC_GRID_CARD_R12N_R4_START */
.private-shell[data-private-page="profile"] .private-grid > [data-apc-google-sync-profile-panel="true"],
.private-shell[data-private-page="profile"] .private-grid > .apc-google-sync-profile-panel {
  grid-column: auto !important;
  align-self: start !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-proof-detail]:empty {
  display: none !important;
}

.private-shell[data-private-page="profile"] [data-apc-google-sync-proof-detail] {
  max-height: 14rem !important;
  overflow: auto !important;
}
/* APC_PRIVATE_PROFILE_GOOGLE_SYNC_GRID_CARD_R12N_R4_END */


/* APC_PRIVATE_PROFILE_CARD_ORDER_POLISH_R12O_START */

/*
  Desired private Profile card layout:
  Row 1: Account | Buddies Who Study local backups
  Row 2: Anki    | Google Drive sync
*/

.private-shell[data-private-page="profile"] .private-grid {
  align-items: start !important;
}

.private-shell[data-private-page="profile"] .private-grid > :first-child {
  order: 10 !important;
}

.private-shell[data-private-page="profile"] .private-grid > .apc-profile-local-backups-panel,
.private-shell[data-private-page="profile"] .private-grid > [data-apc-profile-local-backups-panel="true"] {
  order: 20 !important;
}

.private-shell[data-private-page="profile"] .private-grid > .apc-anki-minimal-card,
.private-shell[data-private-page="profile"] .private-grid > .apc-anki-local-only-panel,
.private-shell[data-private-page="profile"] .private-grid > .apc-anki-manifest-panel {
  order: 30 !important;
}

.private-shell[data-private-page="profile"] .private-grid > [data-apc-google-sync-profile-panel="true"],
.private-shell[data-private-page="profile"] .private-grid > .apc-google-sync-profile-panel {
  order: 40 !important;
}

.private-shell[data-private-page="profile"] .apc-google-sync-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  width: fit-content !important;
  margin: 0.65rem 0 0.75rem !important;
  padding: 0.38rem 0.72rem !important;
  border: 1px solid rgba(101, 214, 166, 0.22) !important;
  border-radius: 999px !important;
  background: rgba(101, 214, 166, 0.13) !important;
  color: #23634d !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

.private-shell[data-private-page="profile"] .apc-google-sync-dot {
  flex: 0 0 auto !important;
  width: 0.52rem !important;
  height: 0.52rem !important;
  border-radius: 999px !important;
  background: #65d6a6 !important;
}

.private-shell[data-private-page="profile"] .apc-google-sync-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.55rem !important;
  margin-top: 0.85rem !important;
}

.private-shell[data-private-page="profile"] .apc-google-sync-actions button {
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  text-align: left !important;
}

@media (max-width: 860px) {
  .private-shell[data-private-page="profile"] .private-grid > :first-child,
  .private-shell[data-private-page="profile"] .private-grid > .apc-profile-local-backups-panel,
  .private-shell[data-private-page="profile"] .private-grid > [data-apc-profile-local-backups-panel="true"],
  .private-shell[data-private-page="profile"] .private-grid > .apc-anki-minimal-card,
  .private-shell[data-private-page="profile"] .private-grid > [data-apc-google-sync-profile-panel="true"],
  .private-shell[data-private-page="profile"] .private-grid > .apc-google-sync-profile-panel {
    order: initial !important;
  }
}

/* APC_PRIVATE_PROFILE_CARD_ORDER_POLISH_R12O_END */
