@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&display=swap');

*,*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #0179FC;
    --secondary-color: #3BDE7D;
    --text-color: #515353;
    --background-color: #F0F0F1;
    --font-family: 'Outfit', sans-serif;
    --secondary-font-family: 'Inter', sans-serif;
    --border: 1.88px solid #007AFF38;
}
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

/** Components styles */

/** Button*/
.reimage-btn{
    padding: 10px 16px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.reimage-btn:hover, .reimage-btn:active{
    background-color: var(--secondary-color);
    color: #fff;
}

.reimage-btn.connecting{
    background: #cccccc;
    cursor: not-allowed;
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

button:disabled:hover{
  background-color: #cccccc;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/** Container Style */
.re-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

/** Header styles */
.re-image-header{
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(90deg, #3BDE7D 0%, #0179FC 100%);
    color: #fff;

}
.re-image-header p{
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;

}

.re-image-header h2{
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0%;

}

/** Re-image Contents styles */
.re-image-contents{
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-top: 40px;
}

/** Steps Indicator styles */
.reimage-steps-section{
    width: 100%;
    padding-bottom: 23px;
    border-bottom: var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
}
.reimage-steps-section .step-indicator {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    width: 100%;
}

.reimage-steps-section .step {
    text-align: center;
    flex: 1;
}

.line-container{
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.line {
    width: 98px;
    border-top: var(--border);
    flex-shrink: 0;
    transition: border-color 0.3s ease;
  }

.line.completed {
    border-color: #3BDE7D;
  }

.reimage-steps-section .step-number {
    font-family: var(--secondary-font-family);
    width: 37px;
    height: 37px;
    background: #e0e0e0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-family: Inter;
    font-weight: 600;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0%;

}

.reimage-steps-section .step.active .step-number {
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
}

.reimage-steps-section .step.active .step-title {
    color: var(--primary-color);
}


/** Information Section styles */
.reimage-settings-section{
    width: 100%;
    padding-top: 31px;
    padding-bottom: 50px;
}
.reimage-settings-section.welcome-section{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reimage-settings-section h2{
    font-family: var(--secondary-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
}

.reimage-settings-section p{
    font-family: var(--secondary-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 206%;
    letter-spacing: 0%;
    text-align: center;
    color: var(--text-color);
}


/** Reimage Banner Section Style */
.reimage-information-section{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 50px;
}
.banner-container{
    max-width: 878px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.welcome-banner img{
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}

/** Reimage Footer Style */
.re-image-footer{
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 32px 26px;
    border-top: var(--border);
    gap: 7px;
}

.re-image-footer #prevBtn{
   background-color: var(--secondary-color);
   color: #fff;
}

.re-image-footer #prevBtn:hover{
    background-color: var(--primary-color);
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}


/** Connect Plugin Setcions styles */
.connect-plugin-step{
    padding-left: 40px;
}

.connect-plugin-step h2{
    text-align: left;
}

.connect-plugin-step p{   
    text-align: left;
}
.reimage-api-form{
    display: block;
    width: 100%;
}

.reimage-api-form label{
    font-family: var(--secondary-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    color: #000;

}

.connect-plugin-step #api-key{
    max-width: 644px;
    width: 100%;
    height: 41px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    padding: 6px 16px;
    margin-bottom: 14px;
    margin-top: 6px;
    background-color: transparent;
    outline: var(--primary-color);
}

.connected-badge {
  background: green; color: #fff; padding: 4px 8px;
  border-radius: 4px; font-size: 12px;
  margin-left: 10px;
  display: none;
}

.connected-badge.connected{
  display: inline-block;
}
.notice, div.error{
  padding: 9px 12px;
  margin-left: 0px;
}
.connect-plugin-section{
    width: calc(100% - 200px);
    display: flex;
    justify-content: space-between;
    padding-left: 40px;
    padding-bottom: 40px;
    padding-right: 40px;
}
.connect-plugin-banner{
    width: 100px;
}

.connect-plugin-section h2{
    font-family: var(--secondary-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;

}

.connect-plugin-section p{
    font-family: var(--secondary-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 206%;
    color: var(--text-color);
}

.connect-plugin-section ol li{
    font-family: var(--secondary-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 206%;
    color: var(--text-color);

}

/** Setting Section Style */
.settings-section{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 40px;
}

.setting-options{
    display: flex;
    padding-left: 40px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
}

.setting-options p{
    text-align: left;
    margin: 0;
}

.settings-section .reimage-settings p.setting-label{
    font-family: var(--secondary-font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 100%;
    display: inline-block; 
    margin-left:6px;

}

.settings-section .reimage-settings p{
    font-family: var(--secondary-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 143%;
    letter-spacing: 0%;
    margin: 0;

}


/** =========== Dashboard Page styles =========== */
.reimage-wrapper{
    font-family: var(--secondary-font-family);
}
.reimage-dashboard-container {
    max-width: calc(100% - 15px);
    /* margin: 0 auto; */
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px;
    padding-top: 0px;
    box-sizing: border-box;
    margin-top: 20px;

  }
  .reimage-dashboard-container h2 {
    font-weight: 800;
    font-size: 11px;
    color: #494949;
    margin: 0px;
    padding: 12px 10px;
    user-select: none;
    line-height: 184%;
    border-bottom: 2px solid #CFD5D7;

  }
  .reimage-dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 0 50px;
  }
  .reimage-progress-section, .right {
    box-sizing: border-box;
  }
  .reimage-progress-section {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
  }

  .reimage-left-text {
    font-weight: 600;
    font-size: 11px;
    color: #374151;
    line-height: 1.3;
    max-width: 280px;
    user-select: none;
  }
  .reimage-left-text p {
    margin: 6px 0 0 0;
  }
  .reimage-line-progress {
    flex: 1 1 395px;
    max-width: 395px;
  }
  .reimage-line-progress .label-small {
    font-weight: 600;
    font-size: 10px;
    color: #374151;
    margin-bottom: 4px;
    user-select: none;
  }
  .reimage-line-progress .bar-container {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    margin-bottom: 12px;
    display: flex;
  }
  .reimage-line-progress .bar-blue {
    background-color: #3b82f6;
    height: 4px;
    border-radius: 9999px;
    width: 0%;
    transition: width 0.5s ease-in-out;
  }
  .reimage-line-progress .bar-green {
    background-color: #4ade80;
    height: 4px;
    border-radius: 9999px;
    width: 0%;
    transition: width 0.6s ease-in-out;
  }
  .reimage-line-progress .bar-label {
    /* position: absolute; */
    /* right: 4px;
    top: -18px; */
    font-weight: 600;
    font-size: 10px;
    color: #374151;
    user-select: none;
    line-height: 5px;
    margin-left: 7px;
    width: 100px;
  }
  .reimage-line-progress .bar-label-green {
    top: -18px;
  }
  .reimage-line-progress .bar-label-blue {
    top: -18px;
  }
  .reimage-line-progress .bar-blue {
    width: 0%;
  }
  .reimage-line-progress .bar-green {
    width: 0%;
  }
  .reimage-bottom-text {
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
  }
  .reimage-bottom-text .percent-large {
    font-weight: 800;
    font-size: 28px;
    color: #2563eb;
    line-height: 1px;
    margin: 0;
  }
  .reimage-bottom-text .percent-large span {
    font-size: 20px;
  }
  .reimage-bottom-text .desc {
    font-weight: 600;
    font-size: 11px;
    color: #374151;
    margin: 0;
  }
  .reimage-dashboard-btn-section{
    width: calc(100% - 15px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px 0;
    margin-right: 15px;
    gap: 10px;
}
  @media (max-width: 640px) {
    .reimage-dashboard-stats {
      flex-direction: column;
    }
    .reimage-progress-section {
      margin-bottom: 24px;
      justify-content: flex-start;
    }
    .reimage-line-progress {
      max-width: 100%;
    }
    .reimage-line-progress .bar-label {
      top: -16px;
      font-size: 9px;
    }
    .reimage-bottom-text {
      flex-wrap: wrap;
    }
  }

  /* Reimage Media Library Column Status*/

  @keyframes optimizing {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  .reimop_status svg{
    width:20px;
    height:20px;
    cursor: pointer;
  }
  .column-reimop_status{
    width: 120px;
    text-align: center;
  }
  .reimop_status.optimizing svg{
    animation: optimizing 1s linear infinite;
  }

  #reimage-completeion-status {
    font-weight: bold;
    padding: 3px 10px;
    color: #fff;
    border-radius: 16px;
    font-size: 11px;
}
#reimage-completeion-status.completed {
    background: #008000;
}
#reimage-completeion-status.optimizing {
    background: #FFA500;
}

#reimage-completeion-status.not-optimized {
  background: red;
}

.optimization-status {
  font-family: var(--secondary-font-family);
  font-size: 13px;
  margin-top: 17px;
  font-weight: bold;
}

#optimization-statuss.loading {
  /* Disable button color gray like*/
  background: #cccccc;
  cursor: not-allowed;
}

/* Loader*/
.loader {
  width: 30px;
  aspect-ratio: 1;
  --c: no-repeat radial-gradient(farthest-side, var(--primary-color) 92%, #0000);
  background: 
    var(--c) 50% 0, 
    var(--c) 50% 100%, 
    var(--c) 100% 50%, 
    var(--c) 0 50%;
  background-size: 6px 6px;
  animation: l18 1s infinite;
  position: relative;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: 1.8px;
  background: repeating-conic-gradient(#0000 0 35deg, var(--secondary-color) 0 90deg);
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 1.8px), #000 0);
  border-radius: 50%;
}

@keyframes l18 {
  100% {
    transform: rotate(.5turn);
  }
}

/* Circular Progress*/
.reimage-progress-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg); /* Rotate to make progress start from top */
}

.progress-ring-bg,
.progress-ring-fill {
  fill: none;
  stroke-width: 8; /* Increase stroke width if necessary */
  r: 66; /* Increase the radius to match the new size */
  cx: 70; /* Adjusted center for new size */
  cy: 70; /* Adjusted center for new size */
}

.progress-ring-bg {
  stroke: #cbd5e1; /* Light gray background */
}

.progress-ring-fill {
  stroke: #3BDE7D; /* Green progress */
  stroke-linecap: round;
  stroke-dasharray: 414.72; /* Circumference of the circle (2 * Pi * 66) */
  stroke-dashoffset: 414.72; /* Start with no progress */
  transition: stroke-dashoffset 0.5s ease; /* Smooth animation for the progress */
}

.reimage-progress-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.reimage-progress-circle .circle-text {
  text-align: center;
  user-select: none;
}

.reimage-progress-circle .circle-text .percent {
  font-weight: 800;
  font-size: 40px; /* Increased font size for better readability */
  color: #111827;
  margin: 0;
}

.reimage-progress-circle .circle-text .label {
  font-weight: 600;
  font-size: 11px; /* Slightly larger label text */
  color: #374151;
  margin: 0;
}
