.follow-up-mail-admin {
  --primary: #1375d5;
  --secondary: #FFB347;
  --accent: #3DDC97;
  --dark: #2E2E3A;
  --bg-page: #e6eef4;
  --line-color: #cadeee;
  --text-light: #cadeee;

  --page-spacing: 2rem;
}

.follow-up-mail-admin {
  background: var(--bg-page);
}

.follow-up-mail-admin #wpcontent .wrap {
  margin: 0;
}

.follow-up-mail-admin #wpcontent {
  padding-left: 0;
}

.follow-up-mail-admin .page-header {
  padding: var(--page-spacing);
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #FFF;
  flex-wrap: wrap;
}

.follow-up-mail-admin .page-header-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.follow-up-mail-admin .page-header-content > h1 {
  order: 1;
}

.follow-up-mail-admin .page-header-content > h2 {
  order: 2;
}

.follow-up-mail-admin .page-header-content .notice,
.follow-up-mail-admin .page-header-notices {
  order: 3;
}

.follow-up-mail-admin .page-header-notices .notice {
  margin: .5rem 0 0;
}

.follow-up-mail-admin .page-header img {
  width: 100px;
}

.follow-up-mail-admin .page-header h2 {
  margin-top: 0;
  color: #666;
}

.follow-up-mail-admin .nav-tab-wrapper {
  display: flex;
  background: #FFF;
  justify-content: flex-start;
  gap: 2rem;
  padding: 1rem var(--page-spacing) 0;
  border-bottom: 1px solid var(--line-color);
  flex-wrap: wrap;
}

.follow-up-mail-admin .nav-tab-wrapper .nav-tab {
  margin: 0;
  border: 0;
  border-bottom: 3px solid #FFF;
  background: 0;
  padding: .5rem 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: all .2s ease-out;
}

.follow-up-mail-admin .nav-tab-wrapper .nav-tab:hover,
.follow-up-mail-admin .nav-tab-wrapper .nav-tab:active,
.follow-up-mail-admin .nav-tab-wrapper .nav-tab:focus {
  color: var(--primary);
  outline: 0;
  box-shadow: none;
}

.follow-up-mail-admin .nav-tab-wrapper .nav-tab-active {
  border-color: var(--primary);
  color: var(--primary);
}

.follow-up-mail-admin .page-wrapper {
  padding: var(--page-spacing);
  overflow-x: auto;
}

.follow-up-mail-admin .notice.pixelmole-review-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--line-color);
  border-radius: 16px;
  background: #eef6ff;
  box-shadow: 0 8px 24px rgba(26, 39, 56, 0.06);
  padding: 1.5rem;
  order: -1;
}

.follow-up-mail-admin .pixelmole-review-notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #d7e9fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.follow-up-mail-admin .pixelmole-review-notice-icon .dashicons {
  color: var(--primary);
}

.follow-up-mail-admin .pixelmole-review-notice-content {
  min-width: 0;
  flex-grow: 1;
}

.follow-up-mail-admin .notice.pixelmole-review-notice p {
  margin: 0 0 1.5rem;
}

.follow-up-mail-admin .notice.pixelmole-review-notice p:first-child {
  margin-top: .5rem;
}

.follow-up-mail-admin .notice.pixelmole-review-notice p:last-child {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.follow-up-mail-admin .notice.pixelmole-review-notice .button-link {
  margin-left: auto;
}

@media (max-width: 782px) {
  .follow-up-mail-admin .notice.pixelmole-review-notice {
    flex-direction: column;
    gap: 10px;
  }
}

.follow-up-mail-admin label {
  cursor: pointer;
}

/* Switch */

.follow-up-mail-admin .switch {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.follow-up-mail-admin .switch input {
  display: none;
}

.follow-up-mail-admin .switch input:checked + .slider {
  background-color: var(--primary);
}

.follow-up-mail-admin .switch input:checked + .slider::before {
  transform: translateX(16px);
}

.follow-up-mail-admin .switch input:disabled + .slider {
  opacity: .2;
  cursor: not-allowed;
}

.follow-up-mail-admin .switch .slider {
  position: relative;
  display: block;
  width: 40px;
  height: 24px;
  border-radius: 99px;
  cursor: pointer;
  background-color: #CCC;
  transition: .4s;
  top: 1px;
}

.follow-up-mail-admin .switch .slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #FFF;
  transition: .4s;
  border-radius: 99px;
  box-shadow: 0 0 5px rgba(0, 0, 0, .2);
}

.follow-up-mail-admin .pill {
  display: inline-block;
  padding: 5px 13px;
  background: var(--bg-page);
  border-radius: 99px;
  color: var(--primary);
  margin-right: .5rem;
}

.follow-up-mail-admin .panel {
  background: #FFF;
  border: 1px solid var(--line-color);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.follow-up-mail-admin .panel.no-margin {
  margin-bottom: 0;
}

.follow-up-mail-admin .panel h2:first-child {
  margin-top: 0;
}

.follow-up-mail-admin .pixelmole-settings-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.follow-up-mail-admin .pixelmole-settings-form {
  flex: 0 0 calc(100% - 770px);
  min-width: 0;
}

.follow-up-mail-admin .pixelmole-settings-side {
  flex: 1 1 730px;
  max-width: 730px;
  display: flex;
  flex-direction: column;
}

.follow-up-mail-admin .pixelmole-settings-resizer {
  flex: 0 0 40px;
  width: 40px;
  cursor: col-resize;
  align-self: stretch;
  position: relative;
}

.follow-up-mail-admin .pixelmole-settings-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--line-color);
  transform: translateX(-50%);
}

body.pixelmole-resizing,
body.pixelmole-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.follow-up-mail-admin .pixelmole-settings-preview .description {
  margin-top: -6px;
}

.follow-up-mail-admin #pixelmole-email-preview {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: #f6f7f7;
}

.follow-up-mail-admin .is-resizing iframe {
  pointer-events: none;
}

@media (max-width: 1400px) {
  .follow-up-mail-admin .pixelmole-settings-form {
    flex: 0 0 calc(100% - 400px);
  }

  .follow-up-mail-admin .pixelmole-settings-side {
    flex: 1 1 400px;
    max-width: 400px;
  }
}

@media (max-width: 780px) {
  .follow-up-mail-admin .pixelmole-settings-layout {
    flex-direction: column;
  }

  .follow-up-mail-admin .pixelmole-settings-form {
    flex: 1 1 auto;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .follow-up-mail-admin .pixelmole-settings-side {
    position: static;
    max-width: none;
    width: 100%;
  }

  .follow-up-mail-admin .pixelmole-settings-resizer {
    display: none;
  }

  .follow-up-mail-admin #pixelmole-email-preview {
    height: 420px;
  }
}

@media (max-width: 960px) {
  .follow-up-mail-admin .page-header img {
    width: 72px;
  }
}

.follow-up-mail-admin.wp-core-ui .button-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.follow-up-mail-admin.wp-core-ui .button-primary.focus,
.follow-up-mail-admin.wp-core-ui .button-primary:focus,
.follow-up-mail-admin.wp-core-ui .button-primary:hover {
  box-shadow: none;
  background: #0d5194;
  border-color: #0d5194;
}

.follow-up-mail-admin .wp-editor-wrap {
  max-width: 100%;
  width: 800px;
}

.follow-up-mail-admin .delay-fields {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.follow-up-mail-admin .page-submit {
  padding-left: 220px;
}

@media (max-width: 782px) {
  .follow-up-mail-admin .page-submit {
    padding-left: 0;
  }

  .follow-up-mail-admin .test-mail-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .follow-up-mail-admin .test-mail-fields .button {
    width: 100%;
  }

  .pixelmole-scheduled-table,
  .pixelmole-analytics-table {
    border: 0;
    background: transparent;
  }

  .pixelmole-scheduled-table thead,
  .pixelmole-analytics-table thead {
    display: none;
  }

  .pixelmole-scheduled-table tbody,
  .pixelmole-analytics-table tbody {
    display: block;
  }

  .pixelmole-scheduled-table tr,
  .pixelmole-analytics-table tr {
    display: block;
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid var(--line-color);
    border-radius: 12px;
  }

  .pixelmole-scheduled-table td,
  .pixelmole-analytics-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .35rem 0;
    border: 0;
    text-align: right;
  }

  .pixelmole-scheduled-table td::before,
  .pixelmole-analytics-table td::before {
    content: "";
    font-weight: 600;
    color: #5b6470;
    text-align: left;
    white-space: nowrap;
  }

  .pixelmole-scheduled-table td:nth-child(1)::before { content: "Send at"; }
  .pixelmole-scheduled-table td:nth-child(2)::before { content: "Order"; }
  .pixelmole-scheduled-table td:nth-child(3)::before { content: "Customer"; }
  .pixelmole-scheduled-table td:nth-child(4)::before { content: "Email"; }
  .pixelmole-scheduled-table td:nth-child(5)::before { content: "Actions"; }

  .pixelmole-analytics-table td:nth-child(1)::before { content: "Date"; }
  .pixelmole-analytics-table td:nth-child(2)::before { content: "Receiver"; }
  .pixelmole-analytics-table td:nth-child(3)::before { content: "Subject"; }
  .pixelmole-analytics-table td:nth-child(4)::before { content: "Order"; }
}

.follow-up-mail-admin .test-mail-fields {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.follow-up-mail-admin .test-mail-fields .regular-text {
  width: 100%;
}

.follow-up-mail-admin .pixelmole-test-result {
  display: none;
  align-items: center;
  border-radius: 7px;
  font-size: 13px;
  background: #f1f5f9;
  color: #39414d;
  min-height: 26px;
  padding: 7px 16px;
  margin-top: 1rem;
}

.follow-up-mail-admin .pixelmole-test-result.is-thinking,
.follow-up-mail-admin .pixelmole-test-result.is-success,
.follow-up-mail-admin .pixelmole-test-result.is-error {
  display: flex;
}

.follow-up-mail-admin .pixelmole-test-result.is-success {
  background: rgba(61, 220, 151, .15);
  color: #0d6b4f;
}

.follow-up-mail-admin .pixelmole-test-result.is-error {
  background: rgba(220, 61, 61, .15);
  color: #7b1e1e;
}


.follow-up-mail-admin .pixelmole-feedback {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: 16px;
  padding: 32px 24px 18px 18px;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.follow-up-mail-admin .pixelmole-feedback-body {
  position: relative;
  padding-left: 32px;
}

.follow-up-mail-admin .pixelmole-feedback-body .dashicons {
  position: absolute;
  left: -3px;
  top: 3px;
  color: var(--primary);
  font-size: 24px;
}

.follow-up-mail-admin .pixelmole-feedback .button-primary {
  width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.4;
}

.follow-up-mail-admin .pixelmole-feedback-close {
  position: absolute;
  top: 0;
  right: 3px;
  width: 28px;
  height: 28px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #7a8696;
  cursor: pointer;
  padding: 0;
}

.follow-up-mail-admin .pixelmole-feedback-close:hover,
.follow-up-mail-admin .pixelmole-feedback-close:focus {
  color: #3c4655;
  outline: none;
  box-shadow: none;
}

.follow-up-mail-admin .pixelmole-feedback-close .dashicons {
  display: inline-block;
  font-family: dashicons;
  font-size: 18px;
  line-height: 28px;
  color: currentColor;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed {
  padding: 8px;
  width: 32px;
  height: 32px;
  max-width: 32px;
  border-radius: 999px;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed .pixelmole-feedback-body {
  display: none;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed .pixelmole-feedback-close {
  position: static;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  display: block;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed .pixelmole-feedback-close .dashicons {
  color: var(--primary);
  font-size: 24px;
  line-height: 24px;
  position: relative;
  top: 4px;
}

.follow-up-mail-admin .pixelmole-feedback .pixelmole-feedback-close .dashicons.only-closed {
  display: none;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed .pixelmole-feedback-close .dashicons.only-closed {
  display: block;
}

.follow-up-mail-admin .pixelmole-feedback.is-collapsed .pixelmole-feedback-close .dashicons.only-open {
  display: none;
}

.follow-up-mail-admin .pixelmole-feedback p {
  margin: 10px 0 0;
  color: #5b6470;
  font-size: 12px;
}

@media (max-width: 782px) {
  .follow-up-mail-admin .pixelmole-feedback {
    right: 16px;
    bottom: 16px;
    max-width: calc(100% - 80px);
  }

  .follow-up-mail-admin .pixelmole-feedback-body {
    padding-left: 0;
  }

  .follow-up-mail-admin .pixelmole-feedback-body .dashicons {
    display: none;
  }
}

.mce-ico.mce-i-ico-button {
    display: inline-block;
    background: url('./../img/ico-button.svg');
}

.pixelmole-scheduled-table td,
.pixelmole-analytics-table td {
  vertical-align: middle;
  word-break: break-word;
}

.pixelmole-settings-form {
  container-type: inline-size;
}

@container (width < 1050px) {
  .follow-up-mail-admin .page-submit {
    padding-left: 0;
  }
}

@container (width < 970px) {
  .follow-up-mail-admin .form-table,
  .follow-up-mail-admin .form-table tbody,
  .follow-up-mail-admin .form-table tr,
  .follow-up-mail-admin .form-table td,
  .follow-up-mail-admin .form-table th {
    display: block;
  }

  .follow-up-mail-admin .form-table th,
  .follow-up-mail-admin .form-table td {
    padding: 0;
    width: 100%;
  }

  .follow-up-mail-admin .form-table th {
    padding: 12px 0 8px;
  }

  .follow-up-mail-admin .regular-text {
    width: 100%;
  }
}

@media(max-width: 782px) {
  .follow-up-mail-admin .page-wrapper {
    overflow: hidden;
  }

  .follow-up-mail-admin {
    --page-spacing: 16px;
  }

  .pixelmole-scheduled-table,
  .pixelmole-analytics-table {
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  .follow-up-mail-admin .pill {
    order: 2;
    margin: 0;
    white-space: nowrap;
  }

  .pixelmole-scheduled-table td,
  .pixelmole-analytics-table td {
    align-items: center;
  }

  .pixelmole-scheduled-table tr,
  .pixelmole-analytics-table tr {
    max-width: calc(100vw - 63px);
  }

  .follow-up-mail-admin .pixelmole-scheduled-table .subject,
  .follow-up-mail-admin .pixelmole-analytics-table .subject {
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .follow-up-mail-admin .wp-responsive-open #wpbody {
    right: -190px;
  }

  .follow-up-mail-admin .nav-tab-wrapper:not(.wp-clearfix)::after {
    display: none;
  }

  .follow-up-mail-admin .nav-tab-wrapper {
    gap: .2rem;
  }

  .follow-up-mail-admin .nav-tab-wrapper .nav-tab {
    width: 100%;
  }

  .follow-up-mail-admin .switch .slider {
    margin-bottom: 1rem;
  }

  .follow-up-mail-admin .form-table th {
    padding-top: 1rem;
  }

  .follow-up-mail-admin.wp-core-ui .button-primary {
    width: 100%;
  }

  .follow-up-mail-admin p.submit {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .follow-up-mail-admin .page-header-content > h1 {
    font-size: 18px;
  }

  .follow-up-mail-admin .page-header h2 {
    font-size: 15px;
  }
}
