#email-controls-and-preview-wrapper {
  position: relative;
  display: flex;
  gap: 16px;
}

#email-controls-sidebar {
  width: 400px;
  min-width: 400px;
  box-sizing: border-box;
  position: sticky;
  align-self: flex-start;
  top: 20px;
  border: 1px solid var(--sl-color-neutral-200);
  border-radius: var(--sl-border-radius-medium);
  background: var(--sl-color-neutral-0);
}

#email-controls-sidebar sl-tab-panel::part(base) {
  padding: 12px;
}

#email-preview-wrapper {
  flex: 1;
  background-color: #f7f7f7;
  text-align: center;
  min-width: 0;
}

#email-html-wrapper {
  max-width: 900px;
  width: 100%;
  margin: auto;
}

#email-daily-or-weekly-btn-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.email-sidebar-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sl-color-neutral-700);
  margin-bottom: 6px;
}

.email-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-send-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

#email-controls-sidebar sl-details {
  margin-bottom: 4px;
}

#email-controls-sidebar sl-details::part(base) {
  border: none;
  border-bottom: 1px solid var(--sl-color-neutral-200);
  border-radius: 0;
}

#email-controls-sidebar sl-details::part(header) {
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 600;
}

#email-controls-sidebar sl-details::part(content) {
  padding: 0 4px 12px;
}

.flex-section {
  display: flex;
}

.flex-section label {
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

.controls-section-wrapper {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ebebeb;
  position: relative;
}

.controls-section-wrapper:last-of-type {
  border-bottom: 0;
}


.controls-section-header {
  font-weight: 700;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 16px;
}

.controls-section-subheader {
  text-decoration: underline;
}

.action-buttons-wrapper {
  display: flex;
}

.action-button {
  font-size: 12px;
  text-transform: uppercase;
  padding: 4px 6px;
  border: 1px solid;
  cursor: pointer;
  opacity: 1;
  transition: all 0.15s ease;
}

.action-button.disabled {
  opacity: 0.4 !important;
  pointer-events: none;
}

.action-button:hover {
  background-color: #f5f5f5;
  opacity: 0.8;
}

.form-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.form-line.space-between {
  justify-content: space-between;
}

.form-line.align-right {
  justify-content: flex-end;
}

.form-line.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.form-line-column {
  display: flex;
  flex-direction: column;
}

#main-section-timerange,
#previous-section-timerange {
  font-size: 12px;
  margin-left: 10px;
  font-weight: bold;
}

#loader-wrapper-email {
  align-items: flex-start;
}

#loader-wrapper-email .loader {
  margin-top: 100px;
}

.no-investor-deck-img-wrapper {
  width: 100%;
  height: 400px;
  background-color: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: background-color 0.25s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.no-investor-deck-img-wrapper:hover {
  background-color: #dfdfdf;
}

.create-an-image {
  background-color: #192342;
  color: #fff;
  border: 2px solid #192342;
  box-shadow: rgb(50 50 93 / 50%) 0px 13px 27px -5px, rgb(255 255 255 / 60%) 0px 8px 16px -8px;
}

.create-an-image:hover {
  background-color: #263564
}

.no-investor-deck-img-label {
  text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 10px;
    color: #8d8d8d;
}

#image-editor-modal {
  padding: 0;
  background-color: #f7f7f7;
  position: fixed;
}

#image-editor-modal-controls {
  display: flex;
  margin: 10px 20px;
  align-items: center;
  gap: 10px;
}

.image-editor-modal-control-btn {
  border: 0;
  padding: 4px 8px;
  cursor: pointer;
}

#image-editor-modal-back {
  background-color: #dfdfdf;
  color: #192342;
}

#image-editor-modal-save-and-use {
  background-color: #192342;
  color: white;
}

#newsMap {
  height: 100%;
  border: 6px solid #192342;
  box-sizing: border-box;
}

.leaflet-tile-container img {
  width: 256.5px !important;
  height: 256.5px !important;
}


/* Legacy mode selector styles removed - using sl-radio-group now */

#email-news-highlights-modal {
  padding: 0;
  background-color: #f7f7f7;
  position: fixed;
}

#email-news-highlights-modal-back {
  background-color: #dfdfdf;
  color: #192342;
}

#email-news-highlights-modal-controls {
  display: flex;
  margin: 10px;
  align-items: center;
}

.news-highlights-modal-articles-table {
  padding: 0 10px;
  overflow-y: auto;

}

.news-highlight-table-row {
  display: flex;
  width: 100%;
}

.news-highlight-table-row:nth-of-type(even) {
  background-color: white;
}

.news-highlight-table-cell {
  padding: 4px 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.news-highlight-table-cell.isAdded {
  width: 50px;
}

.news-highlight-table-cell.date {
  width: 160px;
  font-size: 12px;
}

.news-highlight-table-cell.title {
  width: calc(100% - 210px);
}

.news-highlights-table-header {
  display: flex;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0 10px;
}

#news-highlights-modal-articles-table-news .news-highlight-table-cell.views {
  width: 60px;
}
#news-highlights-modal-articles-table-news .news-highlight-table-cell.date {
  width: 160px;
}
#news-highlights-modal-articles-table-news .news-highlight-table-cell.title {
  width: calc(100% - 270px);
}

.news-highlights-table-header-isAdded {
  width: 50px;
}
#news-highlights-table-header-articles .news-highlights-table-header-date {
  width: 160px;
}
#news-highlights-table-header-articles .news-highlights-table-header-title {
  width: calc(100% - 210px);
}

#news-highlights-table-header-news .news-highlights-table-header-views {
  width: 60px;
}
#news-highlights-table-header-news .news-highlights-table-header-date {
  width: 160px;
}
#news-highlights-table-header-news .news-highlights-table-header-title {
  width: calc(100% - 270px);
}


.news-highlight-table-cell.title a {
  text-decoration: none;
  color: #333;
}

.news-highlights-modal-articles-table-title {
  font-weight: bold;
  padding: 0 10px;
}

.news-highlights-table-controls {
  padding: 0 10px;
  margin: 4px 0;
}

.news-highlights-table-controls input {
  width: 300px;
  margin-left: 0;
}

.news-highlights-modal-articles-table-wrapper {
   margin: 20px 0 40px 0;
}

#news-highlights-modal-articles-table-custom {
  max-height: 200px;
  overflow-y: auto;
}
#news-highlights-modal-articles-table-news {
  max-height: calc(100vh - 440px);
  overflow-y: auto;
}

.news-highlights-title-wrapper {
  display: flex;
  align-items: baseline;
}

.news-highlights-count-wrapper {
  font-size: 12px;
}

#email-news-highlights-modal-save-changes {
  background-color: #007bff;
  color: white;
  margin-left: 4px;
}

.email-ad-spaces-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-ad-spaces-grid sl-select {
  --sl-input-label-font-size-small: 13px;
}

.email-ad-spaces-grid sl-select::part(form-control) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-ad-spaces-grid sl-select::part(form-control-label) {
  flex-shrink: 0;
  min-width: 32px;
  margin-bottom: 0;
}

.email-ad-spaces-grid sl-select::part(form-control-input) {
  flex: 1;
}

.file-input-label {
  width: 100%;
  display: block;
  text-align: center;
  border: 1px dashed rgb(118, 118, 118);
  padding: 10px;
  color: gray;
  font-size: 14px;
  font-weight: 300;
  box-sizing: border-box;
  padding: 50px 0;
  cursor: pointer;
}

.file-input-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}

#new-ad-image-preview {
  display: none;
  pointer-events: none;
}

#new-ad-image-preview img {
  width: 100%;
}

#new-ad-image-preview span {
  position: absolute;
  top: 4px;
  right: 4px;
  cursor: pointer;
  font-size: 30px;
  color: black;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  border: 1px solid;
  box-sizing: border-box;
  pointer-events: all !important;
}

#new-ad-image-preview span:hover {
  opacity: 0.9;
}

/* Bucket Categories */
.bucket-group-details {
  margin-bottom: 2px;
}

.bucket-group-details::part(base) {
  border: none;
  border-bottom: 1px solid var(--sl-color-neutral-200);
  border-radius: 0;
}

.bucket-group-details::part(header) {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
}

.bucket-group-details::part(content) {
  padding: 0 4px 8px;
}


.bucket-cat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.bucket-cat-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--sl-color-neutral-500);
  padding: 4px 4px 2px;
  border-bottom: 1px solid var(--sl-color-neutral-200);
}

.bucket-cat-table th:nth-child(1) { width: 38%; }
.bucket-cat-table th:nth-child(2) { width: auto; }
.bucket-cat-table th:nth-child(3) { width: 52px; }

.bucket-cat-table td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--sl-color-neutral-100);
  vertical-align: top;
  overflow: hidden;
}

.bucket-cat-table td sl-badge {
  vertical-align: middle;
  margin-left: 4px;
}

.bucket-tags-cell .bucket-tags-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.bucket-tags-cell sl-tag::part(base) {
  height: 20px;
  line-height: 18px;
  padding: 0 5px;
  font-size: 11px;
}

.bucket-redirect-badge {
  font-size: 10px;
  color: var(--sl-color-neutral-500);
  display: block;
  margin-top: 2px;
}

.bucket-actions-cell {
  white-space: nowrap;
  text-align: right;
  overflow: visible;
}

.bucket-actions-cell sl-icon-button {
  font-size: 14px;
}

.bucket-actions-cell sl-icon-button::part(base) {
  padding: 2px;
}
