@import url("https://fonts.googleapis.com/css2?family=Cardo:wght@400;700&family=Inter:wght@400&display=swap");

.cv-wrap {
  width: 100%;
  margin: 0 auto;
  color: #2e2e2e;
  cursor: default;
  caret-color: transparent;
  --cv-name-height: auto;
  --cv-intention-height: auto;
}

.cv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}

.cv-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #2f86d0 0%, #1f73bc 100%);
  color: #fff;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: "Cardo", serif;
  font-weight: 400;
}

.cv-count-number {
  font-family: "Cardo", serif;
  font-weight: 700;
}

.cv-open-form {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #2f86d0;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 8px 18px rgba(28, 85, 145, 0.22);
}

.cv-open-form:hover,
.cv-open-form:focus-visible {
  background: #1f73bc;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(28, 85, 145, 0.28);
}

.cv-open-form:focus-visible {
  outline: 2px solid #1f73bc;
  outline-offset: 2px;
}

.cv-feedback {
  min-height: 20px;
  margin-bottom: 14px;
  font-size: 14px;
}

.cv-feedback.cv-feedback-success {
  color: #1a7d2b;
  background: transparent !important;
}

.cv-feedback.cv-feedback-error {
  color: #b13535;
  background: transparent !important;
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  row-gap: 0 !important;
  column-gap: 24px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.cv-grid.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.cv-item {
  text-align: center;
  display: grid;
  grid-template-rows: 92px var(--cv-name-height) var(--cv-intention-height);
  align-items: stretch;
  justify-items: center;
  row-gap: 8px;
  height: 100%;
  padding-inline: 16px;
  box-sizing: border-box;
}

.cv-candle-image {
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: 0;
  display: block;
  align-self: center;
}

.cv-name {
  margin: 0;
  font-family: "Cardo", serif;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 700;
  color: #414141;
  width: 100%;
  display: block;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  text-overflow: initial;
  align-self: start;
}

.cv-intention {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #898989;
  line-height: 1.25;
  min-height: 34px;
  width: 100%;
  overflow: visible;
  display: block;
  word-break: break-word;
  align-self: start;
}

.cv-empty {
  grid-column: 1 / -1;
  font-size: 15px;
  color: #666;
  margin: 6px 0;
}

.cv-pagination-wrap {
  margin-top: 16px;
}

.cv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cv-page-btn {
  min-width: 22px;
  height: 22px;
  padding: 0 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9f9f9f;
  font-family: "Cardo", serif;
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cv-page-btn.is-current {
  color: #777;
  font-weight: 700;
}

.cv-page-arrow {
  width: 22px;
  border: 1px solid #c9c9c9;
  font-size: 16px;
}

.cv-page-arrow.is-disabled {
  opacity: 0.45;
}

.cv-page-separator {
  color: #adadad;
  font-size: 16px;
  line-height: 1;
}

.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.cv-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.cv-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 27, 35, 0.46) !important;
  cursor: pointer;
}

.cv-modal-backdrop:hover,
.cv-modal-backdrop:active,
.cv-modal-backdrop:focus {
  background: rgba(25, 27, 35, 0.46) !important;
}

.cv-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  margin: 10vh auto 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(5, 24, 51, 0.24);
  padding: 22px 20px 20px;
}

.cv-dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent !important;
  color: #4a4a4a;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
  outline: none;
}

.cv-dialog-close:hover,
.cv-dialog-close:focus,
.cv-dialog-close:active {
  background: transparent !important;
  color: #4a4a4a !important;
  box-shadow: none !important;
  border: 0 !important;
}

.cv-dialog h3 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
  color: #272727;
}

.cv-dialog-subtitle {
  margin: 0 0 14px;
  color: #6b6b6b;
  font-size: 14px;
}

.cv-field {
  margin-bottom: 12px;
}

.cv-field label {
  display: block;
  margin: 0 0 5px;
  font-size: 13px;
  color: #3f3f3f;
  font-weight: 600;
}

.cv-choice-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  color: #3f3f3f;
  font-weight: 600;
}

.cv-visibility-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.cv-visibility-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #3f3f3f;
}

.cv-visibility-options input[type="radio"] {
  margin: 0;
}

.cv-field input,
.cv-field textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  color: #2f2f2f;
  background: #fff;
  caret-color: auto;
}

.cv-field textarea {
  resize: vertical;
  min-height: 92px;
}

.cv-field input:focus-visible,
.cv-field textarea:focus-visible {
  border-color: #2f86d0;
  outline: 2px solid rgba(47, 134, 208, 0.16);
}

.cv-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cv-submit {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f86d0 0%, #1f73bc 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 12px 18px;
  cursor: pointer;
}

.cv-submit[disabled] {
  opacity: 0.75;
  cursor: default;
}

@media (max-width: 1024px) {
  .cv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 0 !important;
    column-gap: 16px;
  }
}

@media (max-width: 767px) {
  .cv-top {
    justify-content: center;
  }

  .cv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 0 !important;
    column-gap: 14px;
  }

  .cv-candle-image {
    width: 82px;
    height: 82px;
  }

  .cv-item {
    grid-template-rows: 82px var(--cv-name-height) var(--cv-intention-height);
  }

  .cv-dialog {
    margin-top: 8vh;
    padding: 20px 16px 16px;
    border-radius: 14px;
  }

  .cv-dialog h3 {
    font-size: 23px;
  }
}

@media (max-width: 560px) {
  .cv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-candle-image {
    width: 72px;
    height: 72px;
  }

  .cv-item {
    grid-template-rows: 72px var(--cv-name-height) var(--cv-intention-height);
    padding-inline: 8px;
  }
}
