/* Intra-Company Shared Styles */

/* Login Page Layout */
body.ic-login .login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  width: 100%;
}

body.ic-login .login-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
}

body.ic-login .login-box h2 {
  margin-top: 0;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--rich-black);
}

body.ic-login .form-field {
  margin-bottom: 20px;
}

body.ic-login .form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
}

body.ic-login .form-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
  color: #1a202c;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.ic-login .form-field input:focus {
  outline: none;
  border-color: var(--rich-black);
  box-shadow: 0 0 0 3px rgba(41, 120, 240, 0.12);
}



/* Page Header and Navigation Styles */
.ic-page-header-container {
  text-align: center;
  margin-bottom: 2rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.ic-page-header-container h2 {
  margin-top: 0;
}

.ic-page-header-container nav {
  margin-bottom: 0.5rem;
}

/* Ad Snippet Layout */
.after-main-ad {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.ad-iframe-container {
  width: 100%;
  max-width: 900px;
  height: 90px;
  border: none;
  overflow: hidden;
  display: block;
  margin: 0 auto;
}

/* Control Hub Layout */
.hub-desc {
  color: #666;
  font-size: 0.9rem;
}

.hub-timestamp {
  font-size: 0.8rem;
  color: #888;
}

.msmg-modal {
  position: fixed;
  inset: 0;
  z-index: 10400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.msmg-modal[hidden] {
  display: none;
}

.msmg-modal-content {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msmg-modal-header,
.msmg-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.msmg-modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--rich-black);
}

.msmg-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msmg-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5568;
}

.msmg-modal-body textarea,
.msmg-modal-body select {
  width: 100%;
  box-sizing: border-box;
}

.msmg-ai-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.msmg-ai-status {
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 16px;
  padding: 14px 16px;
}

.msmg-ai-status p {
  margin: 0 0 10px 0;
}

.msmg-ai-draft-preview {
  white-space: pre-wrap;
  font-size: 0.88rem;
  color: #1e3a8a;
}

.msmg-close-btn {
  border: 1px solid #dbe4f0;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.msmg-close-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.msmg-ai-btn {
  width: fit-content;
  margin-top: 4px;
}

.hub-header-secondary {
  margin-top: 3rem;
}

.breaker-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 2rem;
}

.breaker-title {
  text-transform: capitalize;
}

.breaker-meta {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 8px;
}

/* Mailing List Hub Layout */
.delivery-methods {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.delivery-method-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
}

#physical-mail-fields {
  display: none;
  border-top: 1px solid #eee;
  margin-top: 20px;
  padding-top: 20px;
}

#physical-mail-fields h3 {
  margin-top: 0;
  font-size: 1rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.field-spaced {
  margin-top: 20px;
}

/* Search Indexing status styles */
.indexing-progress {
  color: #d97706;
  /* amber-600 */
}

.indexing-success {
  color: #16a34a;
  /* green-600 */
}

.indexing-error {
  color: #dc2626;
  /* red-600 */
}

/* Form Sizing Helpers */
.form-field-fullwidth {
  width: 100%;
  max-width: 440px;
}

.form-field-medium {
  width: 100%;
  max-width: 440px;
}

.form-field-small {
  max-width: 440px;
}

/* Packages Table and Hub Layout Styles */
.wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 40px 24px;
  box-sizing: border-box;
}

.ic-msmg-wrap,
.ic-employees-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.ic-page-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1.5rem;
}

.ic-page-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--rich-black);
  margin-top: 0;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
  text-align: left;
}

.ic-page-header p {
  font-size: 1.05rem;
  color: #4a5568;
  margin: 0;
  line-height: 1.5;
}

.ic-page-header-container {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2rem;
}

.ic-page-header-container h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--rich-black);
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}

.hub-desc {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0 auto 1.5rem auto;
  max-width: 900px;
  line-height: 1.6;
}

.ic-page-header-container nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 1rem;
}

.section-gap,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  border-color: var(--rich-black);
}

.card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--rich-black);
  letter-spacing: -0.01em;
  text-align: left;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 650;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--rich-black);
}

.card p {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
  flex-grow: 1;
  text-align: left;
}



.field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  text-align: left;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea,
.field select,
form input[type="text"],
form select,
form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e0;
  border-radius: 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: #fff;
  color: #1a202c;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
form input[type="text"]:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--rich-black);
  box-shadow: 0 0 0 3px rgba(41, 120, 240, 0.15);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 16px;
}

.status-badge[data-status="ok"] {
  background: #def7ec;
  color: #03543f;
  border: 1px solid #bcf0da;
}

.status-badge[data-status="pending"] {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fef08a;
}

.status-badge[data-status="error"] {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #fbd5d5;
}

.url {
  font-family: monospace;
  background: #f7fafc;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #4a5568;
  word-break: break-all;
  margin-bottom: 12px;
  text-align: left;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.packages-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.packages-table th {
  background: #f8fafc;
  padding: 14px 16px;
  font-weight: 700;
  color: #4a5568;
  border-bottom: 1px solid #e2e8f0;
}

.packages-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  color: #4a5568;
}

.packages-table tr:last-child td {
  border-bottom: none;
}

.packages-table td strong {
  color: var(--rich-black);
}

.packages-table td div {
  margin-top: 4px;
  color: #718096;
}

.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.upload-modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.upload-modal-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rich-black);
}

.upload-file-input {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.hub-header-secondary {
  margin-top: 4rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 3rem;
}

/* Database Editor & Grid Workspace Styles (MSMG & Employees Hubs) */
.msmg-main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.msmg-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: start;
  width: 100%;
  max-width: none;
}

.msmg-table-manager {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.msmg-main.editor-open .msmg-workspace {
  grid-template-columns: 1fr;
}



.msmg-workspace.split-election {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.msmg-main.editor-open .msmg-workspace.split-election {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}



/* Topbar */
.msmg-table-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 16px;
}

.msmg-topbar-spacer {
  flex-grow: 1;
}

.msmg-panel-launchers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}


.msmg-add-actions {
  position: relative;
  display: inline-block;
}

.msmg-add-row {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  font-size: 1.5rem !important;
  line-height: 1;
  border-radius: 50% !important;
}

.msmg-add-menu {
  position: absolute;
  top: 100%;
  display: flex;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 8px 0;
  z-index: 100;
  min-width: 440px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
}

/* Respect the HTML5 [hidden] attribute for add menus; prevent other rules from overriding it */
.msmg-add-menu[hidden] {
  display: none !important;
}

.msmg-add-menu {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #4a5568;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  font-weight: 500;
}

.msmg-add-menu {
  background: #f7fafc;
  color: var(--rich-black);
}

/* Search and Filter Bar */
.msmg-search-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.msmg-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  padding: 8px 18px;
  flex-grow: 1;
  max-width: 440px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.msmg-search-box:focus-within {
  border-color: var(--rich-black);
  box-shadow: 0 0 0 3px rgba(41, 120, 240, 0.12);
}

.msmg-search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  color: #1e293b;
}

.msmg-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.msmg-filter-chip {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.msmg-filter-chip:hover {
  background: #cbd5e0;
  color: var(--rich-black);
}

.msmg-filter-chip.active {
  background: var(--rich-black);
  color: #ffffff;
}

/* Bulk Actions Banner */
.msmg-bulk-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 24px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.msmg-bulk-actions-label {
  font-weight: 700;
  color: #000000;
  font-size: 0.9rem;
}

.msmg-bulk-actions {
  background: white;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s;
}


/* Grid Table */
.msmg-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.msmg-grid {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  table-layout: fixed;
}

.msmg-grid th {
  background: #f8fafc;
  padding: 14px 16px;
  font-weight: 700;
  color: #4a5568;
  border-bottom: 2px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.msmg-grid tr {
  transition: background-color 0.15s ease;
}

.msmg-grid tr:hover {
  background-color: #f8fafc;
}

.msmg-grid td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: middle;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msmg-grid tr:last-child td {
  border-bottom: none;
}

.msmg-cell-content {
  max-width: 440px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Inline Edit Controls inside Grid */
.msmg-grid input[type="text"],
.msmg-grid input[type="number"],
.msmg-grid select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 0.85rem;
  color: #1e293b;
  transition: all 0.15s ease;
}

.msmg-grid input[type="text"]:focus,
.msmg-grid input[type="number"]:focus,
.msmg-grid select:focus {
  background: #ffffff;
  border-color: var(--rich-black);
  box-shadow: 0 0 0 2px rgba(41, 120, 240, 0.1);
  outline: none;
}

.msmg-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rich-black);
  cursor: pointer;
}

/* Editor Panel */
.msmg-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 10300;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.msmg-editor-panel {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 40px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(700px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  position: relative;
  top: auto;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.msmg-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.msmg-editor-overlay-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e0;
  background: #f8fafc;
  color: #1f2937;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.msmg-editor-overlay-close:hover {
  background: #e2e8f0;
}

.msmg-editor-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.msmg-editor-mode-btn {
  border: 1px solid #cbd5e0;
  background: #ffffff;
  color: #4a5568;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.msmg-editor-mode-btn.active {
  background: var(--rich-black);
  border-color: var(--rich-black);
  color: #ffffff;
}

.msmg-editor-overlay[hidden],
.msmg-editor-panel[hidden],
.msmg-panel-form[hidden] {
  display: none !important;
}

body.msmg-editor-open {
  overflow: hidden;
}



@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.msmg-editor-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rich-black);
}

.msmg-panel-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msmg-panel-form label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a5568;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msmg-panel-form input[type="text"],
.msmg-panel-form input[type="email"],
.msmg-panel-form input[type="password"],
.msmg-panel-form input[type="datetime-local"],
.msmg-panel-form select,
.msmg-panel-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.msmg-panel-form input:focus,
.msmg-panel-form select:focus,
.msmg-panel-form textarea:focus {
  border-color: var(--rich-black);
  box-shadow: 0 0 0 3px rgba(41, 120, 240, 0.12);
  outline: none;
}

.msmg-inline-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0;
}

.msmg-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
}

.msmg-inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rich-black);
  cursor: pointer;
}

.msmg-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* Feature Selector Panel */
.msmg-feature-selector-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
}

.msmg-feature-selector-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msmg-feature-selector-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rich-black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.msmg-feature-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.msmg-feature-selector-group:last-child {
  margin-bottom: 0;
}

.msmg-feature-selector-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #718096;
  min-width: 0;
}

.msmg-feature-selector-meta {
  font-size: 0.75rem;
  color: #a0aec0;
  grid-column: 1 / -1;
  min-height: 1.1em;
}

.msmg-feature-selector-label select,
.msmg-feature-selector-label select[multiple] {
  width: 100%;
  box-sizing: border-box;
}

.msmg-feature-selector-group>.intra-btn {
  align-self: flex-start;
  white-space: nowrap;
}

/* EasyPost & Mailing Campaign Results Styling */
.result {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  transition: all 0.3s ease;
  font-family: monospace;
}

.hidden-result {
  display: none;
}

.ok-result {
  background: #ecfdf5;
  color: #03543f;
  border: 1px solid #abefc6;
}

.error-result {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #fbd5d5;
}



/* Premium Story Dropdown Selectors Styling */
.msmg-feature-selector-label select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #1a202c;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  cursor: pointer;
  margin-top: 4px;
}

.msmg-feature-selector-label select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.msmg-feature-selector-label select[multiple] {
  padding: 6px;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  overflow-y: auto;
  min-height: 120px;
}

.msmg-feature-selector-label select[multiple] option {
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.msmg-feature-selector-label select[multiple] option:hover {
  background-color: #f1f5f9;
}

.msmg-feature-selector-label select[multiple] option:checked {
  background-color: #000000 !important;
  color: #ffffff !important;
}



.msmg-election-split-toggle:has(input:checked) .msmg-election-checkmark {
  border-color: #ffffff;
  color: #ffffff;
}

/* MSMG Image Preview Styling */
.msmg-image-preview-container {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.msmg-image-preview {
  position: relative;
  width: 100%;
  text-align: center;
  background-color: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.msmg-image-preview img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  display: block;
}

.msmg-image-preview-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.msmg-image-preview-toolbar button {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  color: #334155;
  transition: transform 0.2s, background 0.2s;
}

.msmg-image-preview-toolbar button:hover {
  background: #ffffff;
  transform: scale(1.05);
}

.msmg-image-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #4a5568;
  font-weight: 500;
  padding: 0 4px;
}

.msmg-image-info-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.msmg-image-info-item:last-child {
  max-width: 25%;
  text-align: right;
}