/* SySpace Edit Profile page.
 * Header/menu styling follows the period "Profile Edit - <section>" screen
 * (light-blue title, right-hand utility links, pipe-separated section menu
 * with a rule under it, right-aligned bold labels). The edit page never
 * applies the owner's theme or custom CSS, so it always stays usable.
 */

.edit-main { background: #fff; padding: 14px 22px 30px; }

.edit-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.edit-title { margin: 0; font-size: 13pt; font-weight: bold; color: #6699cc; display: flex; align-items: center; gap: 6px; }
.edit-title svg { flex: none; }
.edit-side-links { text-align: right; font-size: 8pt; line-height: 1.35; }
.edit-side-links a, .edit-side-links button.linklike { font-weight: normal; display: block; margin-left: auto; }
.edit-tabs { margin: 14px 0 0; padding: 0 0 5px 16px; border-bottom: 1px solid #6699cc; line-height: 1.9; }
.edit-tabs a { font-weight: normal; white-space: nowrap; }
.edit-tabs a[aria-current="page"] { font-weight: bold; color: #000; text-decoration: none; }
.edit-tabs .sep { padding: 0 1px; color: #333; }

.edit-intro { margin: 14px 0 10px; color: #333; line-height: 1.45; }
.edit-intro code, .edit-help code { background: #f2f2f2; padding: 0 2px; }

.edit-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.edit-actions .dirty-note { color: #cc0000; font-weight: bold; }

.edit-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 12px; margin: 0 0 12px; align-items: start; }
.edit-row > .edit-label { text-align: right; font-weight: bold; padding-top: 3px; }
.edit-field input[type="text"], .edit-field input[type="url"], .edit-field input[type="email"], .edit-field input[type="date"],
.edit-field input[type="datetime-local"], .edit-field input[type="number"], .edit-field input[type="password"], .edit-field select, .edit-field textarea {
  font-family: Verdana, Arial, sans-serif; font-size: 9pt; padding: 2px 3px; border: 1px solid #7f9db9; max-width: 100%;
}
.edit-field input[type="text"], .edit-field input[type="url"], .edit-field input[type="email"] { width: 340px; }
.edit-field input[type="password"] { width: 220px; }
.edit-ok { color: #2a7a2a; font-weight: bold; }
.edit-warn { color: #cc0000; font-weight: bold; }
/* the hidden door to Pimp My Profile (under About Me) */
.edit-field .edit-help a.edit-secret { color: #aaa; font-weight: normal; font-style: italic; text-decoration: none; }
.edit-field .edit-help a.edit-secret:hover, .edit-field .edit-help a.edit-secret:focus { color: #ff3399; text-decoration: underline; }
.edit-field textarea { width: 100%; min-height: 4.5em; resize: vertical; }
.edit-field textarea.code { font-family: Consolas, "Courier New", monospace; font-size: 9pt; white-space: pre; tab-size: 2; }
.edit-field .edit-help { display: block; color: #555; font-size: 7.5pt; margin-top: 3px; line-height: 1.4; }
.edit-field .choice { display: block; margin: 2px 0; font-weight: normal; }
.edit-field .choice-inline { display: inline-block; margin: 2px 12px 2px 0; font-weight: normal; }
.edit-field .preview-btn { margin-top: 4px; }
.html-preview { margin-top: 6px; border: 1px dashed #6699cc; padding: 6px; background: #fbfdff; }
.html-preview::before { content: "Preview"; display: block; font-size: 7pt; color: #6699cc; font-weight: bold; margin-bottom: 4px; }

.edit-section-title { font-size: 9pt; font-weight: bold; color: #fff; background: #6699cc; padding: 3px 8px; margin: 18px 0 10px; }
.edit-section-title:first-child { margin-top: 6px; }

/* sticky save bar */
.edit-savebar {
  position: sticky; bottom: 0; z-index: 5; margin: 18px -22px -30px; padding: 8px 22px;
  background: #e5e5e5; border-top: 1px solid #b5b5b5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.edit-savebar.is-dirty { background: #ffffcc; border-top-color: #d4a017; }
.edit-savebar .status { flex: 1 1 auto; font-weight: bold; }
.edit-savebar.is-dirty .status { color: #cc0000; }

/* list editors (schools, companies, posts) */
.list-card { border: 1px solid #b1d0f0; margin-bottom: 12px; }
.list-card-head { background: #d5e8fb; padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-card-head b { overflow-wrap: anywhere; }
.list-card-body { padding: 10px 8px 2px; }
.list-card-body .edit-row { grid-template-columns: 120px minmax(0, 1fr); }
.mini-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.mini-btns .sy-button { font-size: 7pt; padding: .1em .5em; }

table.edit-table { width: 100%; border-spacing: 2px; }
table.edit-table th { background: #6699cc; color: #fff; text-align: left; padding: 3px 5px; font-size: 8pt; }
table.edit-table td { background: #f0f6fd; padding: 4px 5px; vertical-align: middle; overflow-wrap: anywhere; }
table.edit-table img { width: 40px; height: auto; display: block; }

/* Top Friends editor */
.tf-slots { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tf-slot {
  border: 2px solid #cc0000; background: #fff; padding: 4px 4px 6px; text-align: center; position: relative;
  cursor: grab; user-select: none; overflow-wrap: anywhere;
}
.tf-slot.is-hidden { border-style: dashed; border-color: #aaa; opacity: .65; }
.tf-slot.is-dragging { opacity: .35; }
.tf-slot.is-over { background: #ffffcc; }
.tf-slot .tf-num { position: absolute; left: 3px; top: 2px; font-weight: bold; color: #cc0000; font-size: 8pt; }
.tf-slot img { width: 70px; max-width: 100%; height: auto; display: block; margin: 12px auto 4px; pointer-events: none; }
.tf-slot .tf-name { display: block; font-weight: bold; min-height: 2.4em; }
.tf-slot .mini-btns { justify-content: center; margin-top: 4px; }
.tf-slot .mini-btns button { min-width: 24px; }
.tf-cutoff { grid-column: 1 / -1; border-top: 2px dashed #aaa; margin: 2px 0; padding-top: 4px; font-size: 7pt; color: #666; text-align: center; }
.tf-empty { padding: 10px; background: #f5f5f5; border: 1px dashed #aaa; }

/* live preview */
.preview-box { margin-top: 18px; border: 1px solid #6699cc; }
.preview-head { background: #6699cc; color: #fff; padding: 3px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: bold; }
.preview-head a, .preview-head button.linklike { color: #fff; font-weight: normal; text-decoration: underline; }
.preview-frame-wrap { position: relative; overflow: hidden; background: #e5e5e5; }
/* Display-only: the frame is sized to its content, so it never needs to scroll or be clicked. */
.preview-frame-wrap iframe { border: 0; width: 800px; height: 1000px; transform-origin: 0 0; display: block; background: #e5e5e5; pointer-events: none; }

.photo-edit { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.photo-edit img { width: 90px; height: auto; border: 1px solid #ccc; }
.edit-photo-history { list-style: none; padding: 0; margin: 12px 0; }
.edit-photo-history li { display: flex; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid #ccc; padding: 10px 0; overflow-wrap: anywhere; }
.edit-photo-history img { width: 100px; height: 100px; max-width: 100%; object-fit: contain; }
.edit-photo-history p { margin: 0 0 6px; }

@media (max-width: 760px) {
  .edit-main { padding: 12px 16px 24px; }
  .edit-top { flex-direction: column; }
  .edit-side-links { text-align: left; }
  .edit-side-links a, .edit-side-links button.linklike { display: inline; margin: 0 10px 0 0; }
  .edit-tabs { padding-left: 0; }
  .edit-row, .list-card-body .edit-row { grid-template-columns: minmax(0, 1fr); row-gap: 3px; }
  .edit-row > .edit-label { text-align: left; }
  .edit-field input[type="text"], .edit-field input[type="url"], .edit-field input[type="email"], .edit-field input[type="password"] { width: 100%; }
  .tf-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit-savebar { margin: 18px -16px -24px; padding: 8px 16px; }
  table.edit-table .hide-sm { display: none; }
}
