.editable-h1 {
    font-size: calc(2.5 * var(--s0));
    font-family: inherit; /* Ensure the same font is used */
    font-weight: 600;
    border: none; /* Remove input field border */
    padding: 0; /* Match the spacing of the <h1> */
    margin: 0; /* Remove margin */
    background: transparent; /* Make background transparent */
    outline: none; /* Remove focus outline */
    color: inherit; /* Use the same text color */
    text-align: end;
    line-height: inherit;
}

.editable-h2 {
    font-size: var(--s1);
    font-family: inherit; /* Ensure the same font is used */
    font-weight: 600;
    border: none; /* Remove input field border */
    padding: 0; /* Match the spacing of the <h2> */
    margin: 0; /* Remove margin */
    background: transparent; /* Make background transparent */
    width: 100%; /* Ensure the input takes the full width */
    outline: none; /* Remove focus outline */
    color: inherit; /* Use the same text color */
}

input {
    border: calc(0.7 * var(--border-thin)) solid var(--font-color);
    padding: var(--s-2);
    border-radius: var(--s-2);
    min-width: 35ch;
}

select {
    border: calc(0.7 * var(--border-thin)) solid var(--font-color);
    padding: var(--s-2);
    border-radius: var(--s-2);
    min-width: 10ch;
    max-width: 20ch;
    background-color: transparent;
}

.textarea {
    border: calc(0.7 * var(--border-thin)) solid var(--font-color);
    padding: var(--s-2);
    border-radius: var(--s-2);
    min-width: 35ch;
    min-height: calc(7 * var(--s2));
}

.heading-with-checkbox {
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
}

.large-checkbox {
    width: var(--s0);
    height: var(--s0);
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* Hide the default checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: var(--s0);
  height: var(--s0);
  background-color: white;
  border: 1px solid var(--font-color);  /* this color is the border color */
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

/* Create a custom background for the checked state */
input[type="checkbox"]:checked {
  background-color: green;
  border-color: green;
}

/* Add a checkmark using :before pseudo-element */
input[type="checkbox"]:checked::before {
  content: '✔';
  color: white;
  font-size: var(--s-1);
  display: block;
  text-align: center;
}

.error {
    font-size: var(--s0);
    color: red;
}

.fixed-on-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.edit-panel {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: var(--s-1);
}

.edit-panel label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.edit-panel input[type="checkbox"] {
    min-width: 0;
}

.edit-panel:hover {
    opacity: 1;
}

.edit-icon {
    width: calc(0.9 * var(--s1));
    height: calc(0.9 * var(--s1));
}

.edit-icons {
    display: flex;
    justify-content: flex-end;
    margin-block-end: var(--s-3);
    margin-block-start: var(--s-3);
    gap: var(--s-3);
}

.edit-icon-small {
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
}

.with-edit-icon-big {
    display: inline-flex;
    align-items: start;
    gap: var(--s-2);
}

.edit-icon-big {
    height: calc(1.2 * 1cap);
    width: calc(1.2 * 1cap);
    cursor: pointer;
}

.edit-icon-h1 {
    height: calc(2 * var(--s0));
    width: calc(2 * var(--s0));
    margin-top: calc(0.1 * var(--s0));
    cursor: pointer;
}

.deletable-ul {
    padding: 0;
}

.deletable-li::before {
    content: '›'; /* Bullet or custom symbol */
    color: black; /* Customize the color */
    font-size: var(--s1);
}

.deletable-li {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2);
    border-bottom: calc(0.7 * var(--border-thin)) solid var(--font-color);
}

.resume-delete-button,
.plugin-delete-button {
    margin-inline-start: auto;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* for the delete button of badges */

.badge {
    display: flex;
}

.badge-name {
    margin-right: 0;
}

.badge-delete-button {
    background-color: transparent;
    color: var(--font-color);
    border: none;
    cursor: pointer;
    padding-right: 0;
}

.badge-delete-button\:white {
    color: white;
}

.badge-delete-button:hover svg {
    color: #ff0000; /* Optional: change color on hover */
}

.svg-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* htmx animations */

#identity.htmx-swapping {
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

#identity.htmx-added {
    opacity: 0;
}

#identity {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

/* avatar container */

img.editable-avatar,
svg.editable-avatar {
    cursor: pointer; /* Indicate it's clickable */
    transition: border 0.3s ease, background-color 0.3s ease; /* Smooth transitions */
}

img.editable-avatar:hover,
svg.editable-avatar:hover {
    border: 2px solid #007bff; /* A thicker border on hover */
}

/* Active state: While dragging a file over the container */
img.editable-avatar.drag-over,
svg.editable-avatar.drag-over {
    border: 2px solid #007bff; /* A thicker border on hover */
}

editable-form#about [contenteditable="true"] {
    /* Avoid about title deforming blue border box because its too big */
    padding: var(--s-2);
}
