@import "../frontend/variables";
@import "admin-dashboard";

code {
  line-height: 1.6;
}

/** === WordPress default notices === **/
.notice {
  padding: 10px;

  b {
    font-weight: bold;
  }
}

.red-bg {
  background: #ff3131 !important;
  border-color: #ff3131 !important;
  &:hover {
    background: #dc3232 !important;
    border-color: #dc3232 !important;
  }
}

.eazydocs-close-notice {
  display: inline-block;
}

a.eazydocs-close-notice:focus,
a.eazydocs-close-notice:active {
  outline: none;
  box-shadow: none;
}

.eazydocs-close-notice,
.notice ul li a {
  text-decoration: none;
}

.eazydocs-close-notice i {
  font-size: 16px;
  text-decoration: none;
  margin-top: 2px;
  margin-left: -5px;
  color: #dc3232;
}

.eazydocs-close-notice span {
  margin-left: -3px;
}

.eazydocs-close-notice:hover,
.eazydocs-close-notice {
  color: #dc3232;
  font-weight: 600;
}

.notice .notice-action {
  position: relative;
  color: #00a0d2;
}

.notice .notice-action:after {
  content: '';
  position: absolute;
  height: 2px;
  background: #00a0d2;
  width: 100%;
  left: 0;
  bottom: -2px;
}

.metabox-holder #eazydocs_basics.group {
  display: block !important;
}

#get_docs_archive, #get_docs_single, #get_docs_slug {
  text-decoration: none;
  width: 220px;
  background: #050505;
  display: block;
  color: #ffffffb3;
  text-transform: uppercase;
  padding-top: 100px;
  padding-bottom: 100px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 2px 2px black;
  float: left;
  margin: 0 20px 0 0;

  &:hover {
    background: #0d0e2b;
    color: white;
  }

  &:focus {
    outline: none
  }
}

/** === Notice Styles (Global) === **/
.notice.is-dismissible.bottom-10 {
  padding-bottom: 15px;
}

.notice-warning.eaz-notice {
  background: #ffffbe;
}


/** ONE PAGE CSS **/
body.post-type-onepage-docs .wrap .page-title-action:not(.add-onepage),
#adminmenu #toplevel_page_eazydocs ul li a:empty {
  display: none !important;
}

.ezd-select-full {
  max-width: 100% !important;
  padding: 5px 10px !important;
  font-size: 15px !important;
  font-weight: 500;
}

select#ezd_docs_select {
  max-width: 100%
}

label[for="ezd_docs_sidebar"] {
  display: block;
  text-align: left;
  margin: 20px 0 10px;
  font-weight: 500;
  font-size: 16px;
}

label[for="ezd_edit_docs_sidebar"] {
  display: block;
  text-align: left;
  margin: 20px 0 10px;
  font-weight: 400;
  font-size: 16px;
}

textarea#ezd_edit_docs_sidebar {
  min-height: 100px
}

body.post-type-onepage-docs .bulkactions select option:nth-child(2),
body.post-type-onepage-docs .wrap .page-title-action:not(.add-onepage),
#e-admin-top-bar-root ~ #wpbody .wrap .page-title-action:not(.add-onepage),
body.post-type-onepage-docs .type-onepage-docs .row-actions span.inline {
  display: none;
}

.ezd-blank_state {
  padding: 5em 0;
  margin: auto;
  max-width: 520px;
  text-align: center;
  color: #6d7882;
  font-family: Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;

  .title {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.2;
  }

  p {
    margin: 0;
  }
}

p.big-p {
  font-size: 16px;
}

.ezd-btn {
  font-family: Roboto, Arial, Helvetica, Verdana, sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  outline: none;
  border-radius: 3px;
  transition-duration: .3s;

  &.btn-lg {
    font-size: 12px;
    padding: 8px 22px;
    font-weight: 500;
  }

  &.btn-red {
    background: rgb(255, 0, 0);;
    color: #fff;
    border-color: rgb(255, 0, 0);

    &:hover {
      background: #d70202;
      border-color: #d70202;
    }
  }

  &.ezd-btn-pro:hover {
    background: #f4cc8a;
    color: #000;
    border-color: #f4cc8a;
  }

  &.ezd-btn-pro {
    background: #f1bd6c;
    color: #000;
    border-color: #f1bd6c;
  }
}

.button-inline {
  margin-top: 40px;
  display: flex;
  gap: 10px;

  .button:last-child {
    background-color: #007BFF;
    color: #fff;
    border: none;

    &:hover {
      background-color: #0056b3;
    }
  }
}

.ezd-shortcodes-wrap {
  border: 1px solid #e8e8e8;
  background: #fafafa;

  tr {
    color: #575757de;
    display: block;
    font-size: 14px;
    padding: 6px 6px;
    border-bottom: 1px solid #5757571f;

    &:nth-child(odd) {
      background: #f6f6f6
    }

    &:last-child {
      border-bottom: none
    }
  }
}

/** Date Picker **/
.daterangepicker {

   th.prev .glyphicon-chevron-left::before {
    content: "\44";
    display: block;
    font-family: 'ElegantIcons';
    font-size: 16px;
    line-height: 1;
    font-style: normal;
  }
  
  th.next .glyphicon-chevron-right::before {
    content: "\45";
    display: block;
    font-family: 'ElegantIcons';
    font-size: 16px;
    line-height: 1;
    font-style: normal;
  }
  
  .ranges {
    float: none !important;
    display: block;
    padding: 20px;

    button.applyBtn {
      padding: 5px 15px;
      font-size: 14px;
      font-weight: 500;
      border-radius: 3px;
      border: 1px solid var(--ezd_brand_color);
      background: var(--ezd_brand_color_80);
      color: #fff;
      margin-right: 10px;
      margin-top: 10px;
      cursor: pointer;

      &:hover {
        background: #0866ff;
      }

      &.active {
        background: #f1bd6c;
        color: #000;
        border-color: #f1bd6c;
      }
    }

    button.cancelBtn {
      padding: 5px 15px;
      font-size: 14px;
      font-weight: 500;
      border-radius: 3px;
      border: 1px solid #e8e8e8;
      background: #fafafa;
      color: #575757de;
      margin-top: 10px;
      cursor: pointer;

      &:hover {
        background: #f6f6f6;
      }
    }
  }
}


// Admin dashboard review notice
#ezd_notify_review {
  display: flex;
  gap: 20px;
  align-items: center;
  border-radius: 4px;
  border: 1px solid rgba(195, 196, 199, 0.4117647059);
  background: white;
  padding: 20px;

  p, h3 {
    margin: 0px 0 5px;
  }

  img {
    max-height: 120px;
  } 

  .action_links {
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    a:first-child{
      color: white;
    }
  }

  .btn {
    text-decoration: none;
    font-size: 14px;
    color: #098f3e;
    font-weight: 400;

    span {
      font-weight: 500;
    }

    &:focus{
      outline: none;
      border: none;
      box-shadow: none;
    }

    &.red{
      color:red;
    }
  }
}

.ezd-migration-wrapper {
  margin: auto;
  align-items: center;
  height: 100vh;
  display: flex;
  justify-content: center;

  .ezd-migration-inner {
    padding: 50px;
    background: #ffffff;
    text-align: center;
    box-sizing: border-box;
    border-radius: 20px;

    h1 {
      font-size: 26px;
      font-weight: 600;
      margin: 15px 0 30px;
    }

    p {
      font-size: 16px;
      line-height: 1.6;
      color: #444;
      margin: 10px 0 20px;
    }

    button.button-primary {
      padding: 2px 15px;
      font-size: 16px;
      font-weight: 500;
      margin-top: 30px;
      background: var(--clr-blue);
    }

    img {
      max-width: 250px;
    }

    ul {
      margin: 20px auto 0;
      list-style: disc;
      text-align: left;
      max-width: 600px;
      padding-left: 20px;
      font-size: 15px;

      li {
        margin-bottom: 5px;
        line-height: 1.6;
      }
    }

    span {
      margin: 20px auto 30px;
      color: #888;
      font-size: 14px;
      display: block;

      a {
        text-decoration: none;
      }
    }
  }

  .ezd-migration-content {
    text-align: left;
  }
}

.migration-alert-info {
  p {
    margin: 0;
  }

  label {
    display: block;
    text-align: left;
    margin-top: 30px;

    strong {
      text-transform: uppercase;
    }
  }

  .migration-alert-text {
    border: 1px solid #c7c7c7;
    border-radius: 10px;
    text-align: left;
    margin: 20px 0 0;
    background: #fff8e1;
    border-left: 5px solid #ffc107;
    padding: 15px;
    color: #760000;
    font-size: 15px;
    box-sizing: border-box;
  }

  .migration-field-wrap {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 10px 0 0;

    fieldset {
      border: 1px solid gray;
      padding: 4px 15px;
      font-size: 16px;
      line-height: 28px;
      border-radius: 4px;
      font-weight: 500;
      background: #fdfdfd;
    }

    select#ezd_migration_options {
      padding: 3px 30px 5px 15px;
      font-size: 16px;
      line-height: 28px;
      border-radius: 4px;
      width: 60%;

      &:focus {
        outline: none;
        box-shadow: none;

      }
    }
  }

}

.ezd-collaboration-data {
    background: #fbfbfb;
    padding: 10px 0 0;
    margin-top: 12px;
    border-radius: 5px;
  .title-wrapper {
      ul {
        border-bottom: 1px solid #d9d9d9;
        padding: 0 20px;
        li {
          display: inline-block;
          margin-right: 20px;
          margin-bottom: 0;
          font-size: 16px;
          border-bottom: 2px solid transparent;
          padding-bottom: 2px;
          font-weight: 500;
          color: #c4c4c4;
          text-transform: uppercase;
          letter-spacing: .5px;
          cursor: pointer;
          &.active {
            border-color: #4b4bef;
            color: #4b4bef;
          }
      }
    }
  }
  .content-wrapper {
    .inner-content{
      .content-row{
          display: flex;
          width: 100%;
          flex-wrap: wrap;
          justify-content: space-between;
          border-bottom: 1px solid #d9d9d9;
          padding: 10px 20px;
          color: black;
          &:last-child {
            border-bottom: none;
          }
          &:first-child {
            font-weight: bold;
          }
          div {
            &:first-child {
              flex: 1;
              display: flex;
              align-items: center;
              gap: 10px;
              font-size: 16px;
              a {
                color: black;
                text-decoration: none;
                font-weight: normal;
                text-transform: capitalize;
                &:hover {
                  color: #002fff;
                }
              }
            }
            &:last-child {
              flex: 1;
              display: flex;
              justify-content: flex-end;
              align-items: center;
              text-align: center;
              li {
                list-style: none;
                min-width: 80px;
                font-size: 16px;
              }
            }
          }
          &:not(:first-child) {
            &:nth-child(even) {
              background: #ebebeb6e;
            }
          }
          .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden;
            img {
              width: auto;
              height: auto;
              max-width: 100%;
              max-height: 100%;
            }
          }
      }
    }
  }
}

.collaboration-filter{
  li {
    &.active {
      opacity: .5;
      border-color: gray;
    }
  }
}

#collboration_chart {
    background: white;
    margin-top: 11px;
    border-radius: 8px;
}

// Icon with title alignment
.ezd-title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  
  .ezd-ai-feature-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
  }
  
  h3 {
    margin: 0;
    flex-grow: 1;
  }
}

// ═══════════════════════════════════════════════════════════════════════════
// SWEETALERT MODAL STYLES (Pro Upgrade)
// ═══════════════════════════════════════════════════════════════════════════

h2#swal2-title {
	font-size: 28px;
	line-height: 1.2;
}

.swal2-styled.swal2-cancel {
	color: #3d474e;
}

#swal2-html-container {
	font-size: 14px;
	line-height: 1.5;
}

.swal2-html-container {
	line-height: 1.6;
}

.swal2-styled.swal2-confirm.upgrade-premium-button {
	background: linear-gradient(135deg, #5b86e5 0%, #36d1dc 100%);
	outline: none;
	box-shadow: none !important;
	border: none;
	color: #fff;

	&:hover {
		opacity: 0.9;
	}

	> a {
		color: #fff;
		font-weight: 500;
		text-decoration: none;
	}
}

.swal2-title.upgrade-premium-heading {
	margin-bottom: -5px;
}

.pro-notification-body-text {
	font-size: 15px;
	display: block;
	margin-bottom: 25px;
}

.swal2-footer.notification-pro-footer-wrap {
	border-top: none;
	margin: 8px 0 0;
	padding: 0;
}

.swal2-html-container p {
	margin: 0 0 30px;
	font-size: 14px;
}

.docs_visibility_field_wrap {
	text-align: left;
}

.docs_visibility_field_wrap label {
	margin-right: 10px;
	margin-top: -5px;
	display: inline-block;
}

.docs_visibility_field_wrap input#ezd_password_input {
	width: -webkit-fill-available;
	border: 1px solid gray;
	margin-top: 10px;
	padding: 0px 10px;
	font-size: 15px;
	color: black;
}

.docs_visibility_field_wrap input#ezd_password_input:focus {
	outline: none;
	box-shadow: none;
}

/* --- AI Popup Styles --- */
.ezd-ai-popup-container {
  .swal2-popup.ezd-ai-popup-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .swal2-html-container.ezd-ai-popup-body-content {
    margin: 0;
    padding: 0;
    text-align: left;
  }

  .ezd-ai-popup-close {
    color: #64748b;
    &:hover {
      color: #0f172a;
    }
  }
}

.ezd-ai-popup-content {
  background: #fff;
  
  .ezd-ai-header {
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    text-align: center;

    .ezd-ai-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #fff;
      padding: 6px 16px;
      border-radius: 9999px;
      font-size: 12px;
      font-weight: 600;
      color: #6366f1;
      box-shadow: 0 1px 2px rgba(0,0,0,0.05);
      margin-bottom: 20px;
      border: 1px solid #e2e8f0;
    }

    h2 {
      font-size: 32px;
      font-weight: 800;
      color: #0f172a;
      margin: 0 0 12px;
      letter-spacing: -0.02em;
    }

    .ezd-ai-desc {
      font-size: 16px;
      color: #64748b;
      max-width: 600px;
      margin: 0 auto;
      line-height: 1.6;
    }
  }

  .ezd-ai-body {
    padding: 40px;
  }

  .ezd-ai-video-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    background: #000;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;

    video {
      width: 100%;
      display: block;
    }
  }

  .ezd-ai-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 10px;

    .ezd-ai-feature-item {
      .ezd-title-with-icon {
        margin-bottom: 10px;
        
        .ezd-ai-feature-icon {
          font-size: 24px;
        }

        h3 {
          font-size: 18px;
          font-weight: 700;
          color: #1e293b;
        }
      }

      p {
        font-size: 14px;
        color: #64748b;
        line-height: 1.6;
        margin: 0;
      }
    }
  }

  .ezd-ai-popup-footer {
    padding: 30px 40px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;

    &.ezd-ai-active {
      background: #f0fdf4;
      border-top-color: #dcfce7;
      
      .ezd-ai-active-badge {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #16a34a;
        font-weight: 600;
        font-size: 14px;
        margin-right: auto;

        .dashicons {
          font-size: 18px;
          width: 18px;
          height: 18px;
        }
      }
    }

    .ezd-ai-footer-btns {
      display: flex;
      gap: 12px;
      align-items: center;
    }

    .ezd-ai-cta-text {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 10px;
      color: #64748b;
      font-size: 14px;

      .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
        color: #3b82f6;
      }
      
      p {
        margin: 0;
      }
    }

    .ezd-ai-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 24px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.2s;

      .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
      }

      &.ezd-ai-btn-primary {
        background: #6366f1;
        color: #fff;
        box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
        &:hover {
          background: #4f46e5;
          transform: translateY(-1px);
          box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
        }
      }

      &.ezd-ai-btn-secondary {
        background: #fff;
        color: #475569;
        border: 1px solid #e2e8f0;
        &:hover {
          background: #f1f5f9;
          border-color: #cbd5e1;
          color: #1e293b;
        }
      }

      &.ezd-ai-btn-link {
        color: #64748b;
        &:hover {
          color: #3b82f6;
          background: #eff6ff;
        }
      }
    }
  }
}

/** === Admin Menu Separators === **/
// Only target the EazyDocs separators we register (ezd-menu-sep-*).
#adminmenu .wp-submenu a[href*="page=ezd-menu-sep-"] {
  pointer-events: none;
  cursor: default;
  padding: 0 !important;
  margin: 8px 0 !important;
  height: 1px !important;
  min-height: 1px !important;
  background: transparent !important;

  &:hover {
    background: transparent !important;
  }
}

#adminmenu .wp-submenu a[href*="page=ezd-menu-sep-"] .ezd-menu-separator {
  display: block;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  margin: 0 12px;
}

// Field Icons
.ezd-field-icon {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #64748b;
  vertical-align: middle;
  margin-right: 6px;
}

.ezd-subheading-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #3b82f6;
  vertical-align: middle;
  margin-right: 8px;
}

// Primary field highlight
.csf-field.ezd-field-primary {
  background: #f8fafc;
  border-left: 3px solid #3b82f6 !important;
  margin-left: -1px;
}

// Subheading styling in CSF
.csf-field-subheading {
  .csf-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-top: 10px;
  }
}

// Test Email Section
.ezd-test-email-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;

  .ezd-analytics-sample-report {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s !important;
    width: fit-content;

    .dashicons {
      font-size: 18px;
      width: 18px;
      height: 18px;
    }

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    &:active {
      transform: translateY(0);
    }

    &.is-sending {
      opacity: 0.8;
      pointer-events: none;

      .ezd-btn-text {
        display: none;
      }

      .ezd-btn-loading {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
      }
    }
  }

  .ezd-test-email-desc {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    margin: 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #e2e8f0;

    .dashicons {
      font-size: 16px;
      width: 16px;
      height: 16px;
      color: #3b82f6;
      flex-shrink: 0;
      margin-top: 2px;
    }
  }
}

.ezd-test-email-field {
  .csf-fieldset {
    background: #fafbfc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
  }
}

// Help Section
.ezd-email-reports-help {
  margin-top: 10px;

  .ezd-help-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #fffbeb;
    border-radius: 12px;
    border: 1px solid #fde68a;

    .ezd-help-icon {
      flex-shrink: 0;
      font-size: 28px;
      width: 28px;
      height: 28px;
      color: #f59e0b;
    }

    .ezd-help-content {
      flex-grow: 1;

      h4 {
        font-size: 16px;
        font-weight: 700;
        color: #92400e;
        margin: 0 0 12px;
      }

      p {
        font-size: 14px;
        color: #78350f;
        margin: 0 0 12px;
      }

      ul {
        margin: 0 0 16px;
        padding-left: 20px;

        li {
          font-size: 13px;
          color: #78350f;
          margin-bottom: 6px;
          line-height: 1.5;
        }
      }

      .ezd-help-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        background: #f59e0b;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        border-radius: 6px;
        text-decoration: none;
        transition: all 0.2s;

        .dashicons {
          font-size: 14px;
          width: 14px;
          height: 14px;
        }

        &:hover {
          background: #d97706;
          transform: translateY(-1px);
        }
      }
    }
  }
}