.ai-photo-advisor,
.noravoq-ai-widget {
  box-sizing: border-box;
  color: #0b2b3a;
  font-family: Arial, Helvetica, sans-serif;
}

.ai-photo-advisor *,
.noravoq-ai-widget * {
  box-sizing: border-box;
}

/* ========================================
   Shared content
======================================== */

.ai-upload-stage,
.ai-results {
  width: 100%;
}

.ai-eyebrow {
  margin-bottom: 10px;

  color: #0b2b3a;

  font-size: 11px;
  font-weight: 800;

  line-height: 1.3;

  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ai-upload-stage h2,
.ai-results h2 {
  margin: 0;

  color: #0b2b3a;

  font-size: 26px;
  font-weight: 700;

  line-height: 1.15;
}

.ai-lead {
  margin: 14px 0 22px;

  color: #294653;

  font-size: 15px;
  line-height: 1.65;
}

/* ========================================
   Notices
======================================== */

.ai-notice,
.ai-guidance {
  display: flex;
  flex-direction: column;
  gap: 5px;

  margin-bottom: 14px;

  padding: 15px 17px;

  border-left:
    3px solid #0b2b3a;

  background: #f3f7f8;

  color: #163542;

  font-size: 14px;
  line-height: 1.5;
}

.ai-notice strong,
.ai-guidance strong {
  font-weight: 700;
}

.ai-notice--optional {
  border-left-color: #315fd5;
  background: #f4f7ff;
}

.ai-guidance {
  border-left-color: #80949c;
  background: #fafcfc;
}

.ai-usage {
  margin: 18px 0;

  padding: 12px 14px;

  border: 1px solid #b8c8ce;
  border-radius: 6px;

  background: #f7fafb;

  color: #163542;

  font-size: 13px;
  font-weight: 700;

  line-height: 1.45;
}

.ai-usage--limit {
  border-color: #cba85e;

  background: #fff8ea;

  color: #654b13;
}

.ai-warning {
  margin: 0 0 20px;

  padding: 16px 18px;

  border: 1px solid #cba85e;

  background: #fffaf0;

  color: #3f341f;

  font-size: 14px;

  line-height: 1.55;
}

.ai-warning strong {
  display: block;

  margin-bottom: 7px;
}

.ai-warning p {
  margin: 7px 0 0;
}

/* ========================================
   Image uploader
======================================== */

.ai-uploader {
  width: 100%;

  margin-top: 20px;
}

.ai-uploader__input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}

.ai-uploader__dropzone {
  display: flex;
  align-items: center;

  width: 100%;

  gap: 16px;

  padding: 22px;

  border: 1px dashed #aabdc4;
  border-radius: 6px;

  background: #ffffff;

  color: #0b2b3a;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.ai-uploader__dropzone:hover {
  border-color: #0b2b3a;

  background: #f8fbfb;
}

.ai-uploader__plus {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  flex: 0 0 auto;

  border: 1px solid #0b2b3a;
  border-radius: 50%;

  font-size: 27px;
  font-weight: 300;

  line-height: 1;
}

.ai-uploader__copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ai-uploader__copy strong {
  font-size: 15px;
  font-weight: 700;
}

.ai-uploader__copy small {
  color: #5c747e;

  font-size: 12px;

  line-height: 1.45;
}

.ai-uploader__grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 10px;

  margin-top: 12px;
}

.ai-uploader__preview {
  position: relative;

  overflow: hidden;

  aspect-ratio: 1 / 1;

  border-radius: 5px;

  background: #eef3f4;
}

.ai-uploader__preview img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.ai-uploader__remove {
  position: absolute;

  top: 6px;
  right: 6px;

  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background:
    rgba(11, 43, 58, 0.88);

  color: #ffffff;

  font-size: 19px;

  cursor: pointer;
}

.ai-uploader__count {
  margin-top: 8px;

  color: #70848c;

  font-size: 11px;

  text-align: right;
}

/* ========================================
   Buttons
======================================== */

.ai-actions {
  display: flex;

  gap: 10px;

  margin-top: 22px;
}

.ai-button {
  min-height: 48px;

  padding: 11px 18px;

  border-radius: 4px;

  font: inherit;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.ai-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ai-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ai-button--primary {
  border: 1px solid #0b2b3a;

  background: #0b2b3a;

  color: #ffffff;
}

.ai-button--secondary {
  border: 1px solid #bac9cf;

  background: #ffffff;

  color: #0b2b3a;
}

/* ========================================
   Loading
======================================== */

.ai-loading {
  display: flex;

  align-items: center;

  gap: 16px;

  min-height: 220px;

  padding: 30px 8px;
}

.ai-loading__spinner {
  width: 34px;
  height: 34px;

  flex: 0 0 auto;

  border: 3px solid #d7e0e3;
  border-top-color: #0b2b3a;

  border-radius: 50%;

  animation:
    noravoq-ai-spin
    900ms linear infinite;
}

.ai-loading strong {
  display: block;

  margin-bottom: 5px;
}

.ai-loading p {
  margin: 0;

  color: #607680;

  font-size: 14px;

  line-height: 1.5;
}

@keyframes noravoq-ai-spin {
  to {
    transform:
      rotate(360deg);
  }
}

/* ========================================
   Results
======================================== */

.ai-result-card {
  padding: 24px 0;

  border-top: 1px solid #dce5e8;
}

.ai-result-card:last-of-type {
  border-bottom: 1px solid #dce5e8;
}

.ai-result-card__header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 16px;

  margin-bottom: 12px;

  font-weight: 700;
}

.ai-confidence {
  padding: 5px 9px;

  background: #f0f4f5;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.05em;

  text-transform: uppercase;
}

.ai-result-card select {
  width: 100%;

  min-height: 50px;

  padding: 0 14px;

  border: 1px solid #bac9cf;
  border-radius: 4px;

  background: #ffffff;

  color: #0b2b3a;
}

.ai-result-card p {
  margin: 12px 0 0;

  color: #536d78;

  font-size: 14px;

  line-height: 1.55;
}

.ai-result-card__intro {
  margin-bottom: 15px !important;
}

.ai-checkbox-list {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 10px 20px;
}

.ai-checkbox-list label {
  display: flex;

  align-items: flex-start;

  gap: 9px;

  color: #243e49;

  font-size: 13px;

  line-height: 1.4;

  cursor: pointer;
}

.ai-checkbox-list input {
  margin-top: 3px;

  flex: 0 0 auto;
}

/* ========================================
   Floating widget
======================================== */

.noravoq-ai-widget {
  position: relative;

  z-index: 99999;
}

.noravoq-ai-launcher {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 99999;

  display: flex;
  align-items: center;

  gap: 10px;

  min-height: 54px;

  padding:
    8px 18px
    8px 9px;

  border: 0;

  border-radius: 999px;

  background: #0b2b3a;

  color: #ffffff;

  font: inherit;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 8px 30px
    rgba(0, 0, 0, 0.16);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.noravoq-ai-launcher:hover {
  transform:
    translateY(-2px);

  box-shadow:
    0 12px 36px
    rgba(0, 0, 0, 0.2);
}

.noravoq-ai-launcher__icon {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  background:
    rgba(
      255,
      255,
      255,
      0.12
    );

  font-size: 18px;
}

.noravoq-ai-launcher__label {
  white-space: nowrap;
}

/* ========================================
   Popup
======================================== */

.noravoq-ai-panel {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 99999;

  display: flex;
  flex-direction: column;

  width:
    min(
      560px,
      calc(
        100vw -
        48px
      )
    );

  max-height:
    calc(
      100vh -
      48px
    );

  overflow: hidden;

  border: 1px solid #dce5e8;

  border-radius: 16px;

  background: #ffffff;

  color: #0b2b3a;

  box-shadow:
    0 20px 60px
    rgba(0, 0, 0, 0.2);
}

.noravoq-ai-panel__header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 16px;

  flex: 0 0 auto;

  padding: 16px 18px;

  background: #0b2b3a;

  color: #ffffff;
}

.noravoq-ai-panel__brand {
  display: flex;

  align-items: center;

  gap: 10px;
}

.noravoq-ai-panel__brand-icon {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  flex: 0 0 auto;

  border-radius: 50%;

  background:
    rgba(
      255,
      255,
      255,
      0.12
    );
}

.noravoq-ai-panel__brand > div {
  display: flex;
  flex-direction: column;

  gap: 2px;
}

.noravoq-ai-panel__brand strong {
  font-size: 14px;
}

.noravoq-ai-panel__brand small {
  font-size: 11px;

  opacity: 0.72;
}

.noravoq-ai-panel__close {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  flex: 0 0 auto;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background:
    rgba(
      255,
      255,
      255,
      0.1
    );

  color: #ffffff;

  font-size: 24px;

  line-height: 1;

  cursor: pointer;
}

.noravoq-ai-panel__close:hover {
  background:
    rgba(
      255,
      255,
      255,
      0.18
    );
}

.noravoq-ai-panel__body {
  flex: 1 1 auto;

  overflow-y: auto;

  overscroll-behavior: contain;

  padding: 24px;
}

.noravoq-ai-panel
.ai-checkbox-list {
  grid-template-columns: 1fr;
}

.noravoq-ai-panel
.ai-actions {
  flex-direction: column;
}

.noravoq-ai-panel
.ai-button {
  width: 100%;
}

/* ========================================
   Responsive
======================================== */

@media (
  max-width: 767px
) {
  .noravoq-ai-launcher {
    right: 16px;
    bottom: 16px;
  }

  .noravoq-ai-panel {
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;

    max-height: 90vh;

    border-radius:
      18px 18px
      0 0;
  }

  .noravoq-ai-panel__body {
    padding:
      20px 16px
      28px;
  }

  .ai-upload-stage h2,
  .ai-results h2 {
    font-size: 23px;
  }

  .ai-uploader__grid {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .ai-result-card__header {
    align-items: flex-start;

    flex-direction: column;
  }

  .ai-checkbox-list {
    grid-template-columns: 1fr;
  }

  .ai-actions {
    flex-direction: column;
  }

  .ai-button {
    width: 100%;
  }
}

@media (
  prefers-reduced-motion:
  reduce
) {
  .noravoq-ai-launcher,
  .ai-button {
    transition: none;
  }

  .ai-loading__spinner {
    animation-duration:
      1800ms;
  }
}
