/* Minimal styles for the New Story publish modal */
.modal-container {
  max-width: 1100px;
}
#cover_picker_list img { box-shadow: 0 2px 6px rgba(0,0,0,.12); }
#cover_picker_list .btn { min-width: 110px; }
.note-toolbar-wrapper { z-index: 2; }

/* Force two-column layout for modal content - override Bootstrap col-12 stacking */
/* Only target direct child rows of modal-body, not nested rows within forms */
#modal_add_image .modal-body > .container > .row {
  display: flex !important;
  flex-wrap: nowrap !important;
}

#modal_add_image .col-12.col-md-8 {
  flex: 0 0 66.666667% !important;
  max-width: 66.666667% !important;
  transition: margin-left 0.3s;
}

#modal_add_image .col-12.col-md-4 {
  flex: 0 0 33.333333% !important;
  max-width: 33.333333% !important;
}

/* Modal left column spacing adjusts to sidebar state */
/* When sidebar is expanded (185px width) */
body:not(.sidebar-collapsed) #modal_add_image .modal-dialog {
  margin-left: 185px; /* Offset by expanded sidebar width */
  max-width: calc(100% - 185px); /* Prevent overflow */
}

/* When sidebar is collapsed (50px width) */
body.sidebar-collapsed #modal_add_image .modal-dialog {
  margin-left: 50px; /* Offset by collapsed sidebar width */
  max-width: calc(100% - 50px); /* Prevent overflow */
}

/* Seamless subtitle input + dropzone connection */
#modal_add_image #inp_subtitle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

#modal_add_image #input2 {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Seamless dropzone + submit button connection */
#modal_add_image #btn4_submit {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Custom floating labels with persistent placeholder */
#modal_add_image .form-floating-custom {
  position: relative;
}

#modal_add_image .form-floating-custom > .form-control {
  height: auto;
  padding: 1rem 0.75rem;
  line-height: 1.25;
}

#modal_add_image .form-floating-custom > label {
  position: absolute;
  top: -0.75rem;
  left: 0.5rem;
  padding: 0 0.25rem;
  background: white;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

/* Show floating label only when input has content */
#modal_add_image .form-floating-custom > .form-control:not(:placeholder-shown) ~ label,
#modal_add_image .form-floating-custom > .form-control:focus:not(:placeholder-shown) ~ label {
  opacity: 1;
  transform: translateY(0);
}

/* Keep placeholder always visible */
#modal_add_image .form-floating-custom > .form-control::placeholder {
  opacity: 1;
  color: #adb5bd;
}

#modal_add_image .form-floating-custom > .form-control:focus::placeholder {
  opacity: 0.5;
}

/* Cover image section styling when moved below submit */
#modal_add_image .cover-image-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
}

#modal_add_image .cover-image-section h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
}

#modal_add_image .cover-image-section .form-text {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

/* Tag bubbles/chips (Gmail-style) */
#modal_add_image .tags-container {
  position: relative;
  min-height: 38px;
  padding: 0.375rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  cursor: text;
  background-color: #fff;
}

#modal_add_image .tags-container:focus-within {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#modal_add_image .tag-bubble {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background-color: #e7f1ff;
  border: 1px solid #b6d4fe;
  border-radius: 1rem;
  font-size: 0.875rem;
  color: #084298;
  gap: 0.375rem;
}

#modal_add_image .tag-bubble .tag-remove {
  cursor: pointer;
  font-weight: bold;
  color: #084298;
  opacity: 0.7;
  transition: opacity 0.15s;
  padding: 0 0.125rem;
  line-height: 1;
}

#modal_add_image .tag-bubble .tag-remove:hover {
  opacity: 1;
}

#modal_add_image .tags-input {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  padding: 0.25rem;
  font-size: 1rem;
  background: transparent;
}

#modal_add_image .tags-input::placeholder {
  color: #adb5bd;
}

