/* Fast bredde på labels i Export Edit forms */
.savvy-exporttool-details-form .col-form-label {
    min-width: 135px;
    max-width: 135px;
    width: 135px;
    text-align: right;
}

/* Export Edit UI: max width and centering */
.savvy-exporttool-edit-wrapper {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Remove right-align for Save Export Details button */
.savvy-exporttool-details-form .mb-3.row:last-of-type .col-sm-6 {
    display: block;
    justify-content: unset;
    align-items: unset;
}

/* Override Bootstrap offset for Save Export Details button */
.savvy-exporttool-details-form .mb-3.row:last-of-type .offset-sm-2 {
    margin-left: 0 !important;
} 


.savvy-feedtool-header {
  background: #ecebe4 !important;
  color: #0c6b35 !important;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
}


.savvy-client-table {
    width: 100%;
    table-layout: fixed;
}
.savvy-client-table th,
.savvy-client-table td {
    width: auto;
}
.savvy-client-table th:last-child,
.savvy-client-table td:last-child {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    text-align: center;
}
.savvy-client-table th:nth-child(3),
.savvy-client-table td:nth-child(3) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}
.savvy-client-table td:nth-child(3) {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 40px;
}

/* Sidebar width and icon size */
.savvy-feedtool-sidebar {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    padding-left: 0;
    padding-right: 0;
}
.savvy-menu-icons .nav-link i {
    font-size: 25px !important;
    width: 25px;
    height: 25px;
    display: inline-block;
    text-align: center;
}

/* Afstand mellem Feeds og Options kolonner */
.savvy-client-table td:nth-child(3) {
    padding-right: 24px;
}

/* Ens bredde og højrejustering for Feeds-knap */
.savvy-feedtool-client-feeds {
    min-width: 110px;
    text-align: right;
    justify-content: flex-end;
    display: flex;
    align-items: center;
    gap: 0.3em;
}
.feed-count-mono {
    font-family: monospace;
    min-width: 2ch;
    text-align: right;
    display: inline-block;
}

/* Horisontal menu under sidetitel */
.savvy-feedtool-horizontal-menu-wrap {
    width: 100%;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    background: #ecebe4;
    padding: 0.5rem 0 0.5rem 0;
}
.savvy-feedtool-horizontal-menu {
    flex-direction: row !important;
    gap: 0;
}
.savvy-feedtool-horizontal-menu .nav-item {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
}
.savvy-feedtool-horizontal-menu .nav-link {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0;
}

/* Fjern sidebar hvis den stadig findes */
.savvy-feedtool-sidebar { display: none !important; }

/* Custom farve til horisontal menu */
.savvy-menu-clients,
.savvy-menu-exports,
.savvy-menu-specialists,
.savvy-menu-global-settings,
.savvy-menu-feeds {
    color: #39b1a2 !important;
    background: none !important;
    border: none !important;
}
.savvy-menu-clients.active,
.savvy-menu-specialists.active,
.savvy-menu-global-settings.active,
.savvy-menu-feeds.active,
.savvy-menu-exports.active,
.savvy-menu-clients:focus,
.savvy-menu-specialists:focus,
.savvy-menu-exports:focus,
.savvy-menu-global-settings:focus,
.savvy-menu-feeds:focus {
    color: #fff !important;
    background: #39b1a2 !important;
    border: none !important;
}
.savvy-menu-clients i,
.savvy-menu-exports i,
.savvy-menu-specialists i,
.savvy-menu-global-settings i,
.savvy-menu-feeds i {
    color: #39b1a2 !important;
}
.savvy-menu-clients.active i,
.savvy-menu-exports.active i,
.savvy-menu-specialists.active i,
.savvy-menu-global-settings.active i,
.savvy-menu-feeds.active i {
    color: #fff !important;
}

/* Custom knapper: solid #39b1a2, hvid tekst, ingen gradient */
.btn.btn-secondary.savvy-feedtool-client-feeds,
.btn.btn-secondary.dropdown-toggle,
.btn.btn-success#savvy-add-new-client-btn,
.btn.btn-success#savvy-add-new-feed-btn,
.btn.btn-success#savvy-add-new-specialist-btn,
.btn.btn-success#savvy-add-new-export-btn {
    background: #39b1a2 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.btn.btn-secondary.savvy-feedtool-client-feeds:hover,
.btn.btn-secondary.dropdown-toggle:hover,
.btn.btn-success#savvy-add-new-client-btn:hover,
.btn.btn-success#savvy-add-new-feed-btn:hover,
.btn.btn-success#savvy-add-new-specialist-btn:hover,
.btn.btn-success#savvy-add-new-export-btn:hover {
    background: #094842 !important;
    color: #fff !important;
}

/* Sikrer at dropdown-menuen ikke får farve */
.dropdown-menu {
    background: #fff;
}


.savvy-feed-table {
    width: 100%;
    /* max-width: 1000px; */
}

/* NYT: Centrer og sæt max bredde på plugin-indhold */
#page > div.wrap > .container-fluid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.savvy-feedtool-header,
.savvy-feedtool-horizontal-menu-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.savvy-feedtool-export-count-btn {
    background-color: #39b1a2 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    border-radius: 6px;
    padding: 6px 18px;
    height: 38px;
    transition: background 0.2s;
}
.savvy-feedtool-export-count-btn:hover,
.savvy-feedtool-export-count-btn:focus {
    background-color: #094842 !important;
    color: #fff !important;
}
.savvy-feedtool-export-count-btn .feed-count-mono {
    font-weight: 400 !important;
}
.savvy-specialist-edit-btn {
    background-color: #39b1a2 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    border-radius: 6px;
    padding: 6px 18px;
    height: 38px;
    transition: background 0.2s;
}
.savvy-specialist-edit-btn:hover,
.savvy-specialist-edit-btn:focus {
    background-color: #094842 !important;
    color: #fff !important;
}
.savvy-specialist-delete-btn {
    background-color: #be658e !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 18px;
    height: 38px;
    transition: background 0.2s;
}
.savvy-specialist-delete-btn:hover,
.savvy-specialist-delete-btn:focus {
    background-color: #8e2e5d !important;
    color: #fff !important;
}

.savvy-custom-dropdown {
  position: relative;
  display: inline-block;
}
.savvy-custom-dropdown-toggle {
  background: #39b1a2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  cursor: pointer;
  font-weight: 400;
  transition: background 0.2s;
}
.savvy-custom-dropdown-toggle:hover,
.savvy-custom-dropdown-toggle:focus {
  background: #094842;
}
.savvy-custom-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1000;
  padding: 0;
  margin: 0;
  list-style: none;
}
.savvy-custom-dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 1em;
}
.savvy-custom-dropdown-menu li a:hover {
  background: #f2f2f2;
  color: #094842;
}
.savvy-custom-dropdown.open .savvy-custom-dropdown-menu {
  display: block;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1em;
  gap: 0.4em;
  transition: color 0.2s;
  padding: 2px 0;
}
.toggle-switch.enabled {
  color: #39b1a2;
}
.toggle-switch.disabled {
  color: #555;
}
.savvy-feedtool-toggle-enabled {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.savvy-feedtool-toggle-enabled:focus {
  outline: 2px solid #39b1a2;
}

.toggle-switch i {
  font-size: 2em;
  line-height: 1;
}

.savvy-toggle-switch {
  width: 44px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  outline: none;
  vertical-align: middle;
}
.savvy-toggle-switch::before {
  content: "";
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #39b1a2; /* grøn for enabled */
  transition: background 0.2s;
}
.savvy-toggle-switch[data-enabled="0"]::before {
  background: #555; /* koksgrå for disabled */
}
.savvy-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: left 0.2s;
}
.savvy-toggle-switch[data-enabled="1"]::after {
  left: 22px;
}
.savvy-toggle-switch:focus {
  outline: 2px solid #39b1a2;
}

/* Status firkant til feed-oversigt */
.savvy-feed-status {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin: 0 auto;
  vertical-align: middle;
  border: 2px solid #e0e0e0;
  box-sizing: border-box;
}
.savvy-feed-status-green {
  background: #39b1a2; /* savvy grøn */
}
.savvy-feed-status-red {
  background: #be658e; /* savvy rød */
}
.savvy-feed-status-grey {
  background: #e0e0e0;
}

/* Feed Logs */
.feed-logs-list {
    max-height: 500px;
    overflow-y: auto;
}

.feed-log-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.feed-log-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.feed-log-time {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.feed-log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.feed-log-item.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.feed-log-item.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.feed-log-item.import_error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.feed-log-item.export_error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

/* Select2 styling for currency fields dropdown */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    background-color: #fff;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.25rem 1.2em 0.25rem 0.5em;
    margin: 0.125rem;
    font-size: 0.875rem;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #dc3545;
    margin-left: 0.5em;
    margin-right: 0;
    font-weight: bold;
    order: 2;
    position: static;
    float: none;
    cursor: pointer;
    background: none;
    border: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice span {
    order: 1;
}

/* Skjul default X til venstre hvis det skulle vises */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:first-child {
    margin-left: 0;
}

.select2-container--default .select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e9ecef;
}

/* Ensure Select2 dropdown matches form-select styling */
.select2-container--default .select2-selection--multiple:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Match the width and layout of the currency fields row */
#savvy-export-currency-fields {
    width: 100% !important;
}

.select2-container {
    width: 100% !important;
}

/* Ensure proper alignment in the Misc tab form */
#export-misc .row.align-items-center .col-sm-6 {
    display: flex;
    align-items: center;
    max-width: 320px;
    flex: 0 0 320px;
}
@media (max-width: 575px) {
    #export-misc .row.align-items-center .col-sm-6 {
        max-width: 100%;
        flex: 1 1 100%;
    }
}
#export-misc .select2-container {
    flex: 1;
    max-width: 320px;
}

/* Gør Currency-labelen bredere i Misc-tabben */
#export-misc .row.align-items-center .col-sm-1 {
    min-width: 90px;
    max-width: 140px;
    flex: 0 0 110px;
    text-align: right;
}
@media (max-width: 575px) {
    #export-misc .row.align-items-center .col-sm-1 {
        min-width: 60px;
        max-width: 100%;
        flex: 1 1 100%;
        text-align: left;
    }
}

/* Save Misc Settings-knap skal float: right i Misc-tabben */
#export-misc .savvy-misc-save-btn {
    float: right;
    margin-left: 1rem;
}
@media (max-width: 575px) {
    #export-misc .savvy-misc-save-btn {
        float: none;
        display: block;
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Fælles float: right for save-knapper i Export Settings og Misc-tab */
.savvy-float-save-btn {
    float: right;
    margin-left: 1rem;
}
@media (max-width: 575px) {
    .savvy-float-save-btn {
        float: none;
        display: block;
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Savvy Button Colors - Override Bootstrap */
.btn.btn-success.savvy-btn-green,
.btn.btn-success {
    background: #39b1a2 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.btn.btn-success.savvy-btn-green:hover,
.btn.btn-success:hover {
    background: #094842 !important;
    color: #fff !important;
}

.btn.btn-primary.savvy-btn-blue,
.btn.btn-info.savvy-btn-blue {
    background: #41a0f4 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.btn.btn-primary.savvy-btn-blue:hover,
.btn.btn-info.savvy-btn-blue:hover {
    background: #1a7fd4 !important;
    color: #fff !important;
}

/* Savvy Tab Button Colors - Feed Edit and Export Edit */
.nav-tabs .nav-link {
    color: #043833 !important;
    border: none !important;
    background: none !important;
    padding: 0.5rem 1rem !important;
    margin-right: 0.25rem !important;
    border-radius: 0.375rem 0.375rem 0 0 !important;
    transition: color 0.15s ease-in-out !important;
}

.nav-tabs .nav-link:hover {
    color: #39b1a2 !important;
    border: none !important;
    background: none !important;
}

.nav-tabs .nav-link.active {
    color: #39b1a2 !important;
    border: none !important;
    background: none !important;
    font-weight: 600 !important;
}

.nav-tabs .nav-link.active:hover {
    color: #39b1a2 !important;
    border: none !important;
    background: none !important;
}

/* Ensure tab content has proper border */
.nav-tabs {
    border-bottom: 1px solid #dee2e6 !important;
}

.tab-content {
    border: 1px solid #dee2e6 !important;
    border-top: none !important;
    border-radius: 0 0 0.375rem 0.375rem !important;
}