.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;
}

.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;
}

.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-guidance--compact {
  margin: 15px 0 0;
  padding: 13px 15px;
}

.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;
}

/* Upload */

.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;
}

.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;
}

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

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

.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;
}

.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 p {
  margin: 5px 0 0;
  color: #607680;
  font-size: 14px;
}

@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,
.ai-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #bac9cf;
  border-radius: 4px;
  background: #ffffff;
  color: #0b2b3a;
  font: inherit;
}

.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,
.ai-radio-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,
.ai-radio-list input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.ai-radio-list {
  display: grid;
  gap: 11px;
}

/* Length */

.ai-field {
  position: relative;
  display: block;
}

.ai-field input {
  padding-right: 52px;
}

.ai-field__suffix {
  position: absolute;
  top: 50%;
  right: 15px;
  transform:
    translateY(-50%);
  color: #657d86;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.ai-field-error {
  margin-top: 8px;
  color: #9b3e33;
  font-size: 12px;
  font-weight: 700;
}

.ai-selection-summary {
  display: block;
  padding: 14px 16px;
  border: 1px solid #cbd8dc;
  border-radius: 5px;
  background: #f5f9fa;
  color: #0b2b3a;
  font-size: 14px;
  line-height: 1.45;
}

/* Floating launcher */

.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);
}

.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;
}

/* Panel */

.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;
  cursor: pointer;
}

.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%;
}

@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;
  }
}

@media (
  prefers-reduced-motion:
  reduce
) {
  .ai-loading__spinner {
    animation-duration:
      1800ms;
  }
}
