/* static/css/price_increase_letter_tool.css */

.pilp-panel {
  position: relative;
  margin: 2.5rem 0;
  padding: 2.5rem;
  background: linear-gradient(180deg, #eef4ff 0%, #fbfcff 100%);
  border: 0.0625rem solid #d3e2fa;
  border-radius: 1.5rem;
  box-shadow: 0 0.75rem 2.5rem rgba(0,0,0,0.08);
}

.pilp-head {
  text-align: center;
  margin: 0 0 2rem;
}

.pilp-badge {
  display: inline-block;
  width: fit-content;
  margin: 0 auto 0.8rem;
  padding: 0.6rem 2rem;
  border-radius: 999rem;
  background: #3468e0;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 0 rgba(52, 104, 224, 0.45);
  animation: pilp-badge-pulse 2.2s ease-out infinite;
}

@keyframes pilp-badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 104, 224, 0.45); }
  70% { box-shadow: 0 0 0 0.55rem rgba(52, 104, 224, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 104, 224, 0); }
}

h3.pilp-headline {
  display: block;
  background: none;
  margin: 0.7rem auto 0;
  padding: 0;
  max-width: 34rem;
  color: #12233f;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.pilp-headline__mark {
  color: #3468e0;
  white-space: nowrap;
}

.pilp-lead {
  margin: 0.6rem auto 0;
  max-width: 32rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.9;
}

.pilp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.pilp-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pilp-field--wide {
  grid-column: 1 / -1;
}

.pilp-dual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.25rem;
}

@media (min-width: 48rem) {

  .pilp-dual-grid {
    grid-template-columns: 1fr 1fr;
  }

}

.pilp-field label,
.pilp-field__label {
  color: #1f2937;
  font-size: 0.85rem;
  font-weight: 700;
}

.pilp-field select,
.pilp-field input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border: 0.0625rem solid #dce6f5;
  border-radius: 0.75rem;
  color: #1f2937;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.pilp-tag-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pilp-tag-input-row {
  display: flex;
  gap: 0.5rem;
}

.pilp-tag-input-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
}

.pilp-tag-add {
  flex: 0 0 auto;
  padding: 0 1.1rem;
  background: #3468e0;
  border: none;
  border-radius: 0.75rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pilp-tag-add:hover {
  opacity: 0.9;
}

.pilp-tag-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pilp-field-note {
  display: block;
  margin-top: -0.15rem;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.5;
}

.pilp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.pilp-tags:empty {
  display: none;
}

.pilp-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  background: #eef4ff;
  border: 0.0625rem solid #b9d7fb;
  border-radius: 999rem;
  color: #1f2937;
  font-size: 0.85rem;
  font-weight: 600;
}

.pilp-tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border: none;
  border-radius: 999rem;
  color: #3468e0;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.pilp-tag__remove:hover {
  background: #dce6f5;
}

.pilp-cost-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

@media (min-width: 48rem) {

  .pilp-cost-groups {
    grid-template-columns: 1fr 1fr;
  }

}

.pilp-cost-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 0.0625rem solid #dce6f5;
  border-radius: 0.9rem;
}

.pilp-cost-group__title {
  color: #2557c7;
  font-size: 0.78rem;
  font-weight: 700;
}

.pilp-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pilp-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  background: #f5f9ff;
  border: 0.0625rem solid #dce6f5;
  border-radius: 999rem;
  color: #1f2937;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pilp-chip input {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  opacity: 0;
  pointer-events: none;
}

.pilp-chip:hover {
  border-color: #b9d7fb;
}

.pilp-chip.is-checked {
  background: #3468e0;
  border-color: #3468e0;
  color: #ffffff;
}

.pilp-button-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.pilp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20rem;
  padding: 0.95rem 1.8rem;
  border: none;
  border-radius: 999rem;
  background: #3468e0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 0.625rem 1.125rem rgba(52, 104, 224, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.pilp-button:hover {
  transform: translateY(-0.0625rem);
  opacity: 0.98;
}

.pilp-notice {
  margin: 1rem 0 0;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.7;
  text-align: center;
}

.pilp-notice--warn {
  margin-top: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fffaf0;
  border: 0.0625rem solid #fbd38d;
  border-radius: 0.75rem;
  color: #92620a;
  font-weight: 600;
  text-align: left;
}

.pilp-result-warn {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #fffaf0;
  border: 0.0625rem solid #fbd38d;
  border-radius: 0.75rem;
  color: #92620a;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.7;
}

.pilp-error {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #fef2f2;
  border: 0.0625rem solid #fecaca;
  border-radius: 0.75rem;
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1.7;
}

.pilp-result {
  position: relative;
  margin-top: 2.5rem;
  padding: 2rem 1.5rem 1.5rem;
  background: #ffffff;
  border: 0.125rem dashed #a9c3f5;
  border-radius: 1.35rem;
  box-shadow: 0 0.5rem 1.25rem rgba(30, 41, 59, 0.05);
}

.pilp-result__badge {
  position: absolute;
  top: -0.85rem;
  left: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  background: #3468e0;
  color: #ffffff;
  border-radius: 999rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0.25rem 0.625rem rgba(52, 104, 224, 0.3);
}

.pilp-textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  background: #f5f9ff;
  border: 0.0625rem solid #dce6f5;
  border-radius: 0.9rem;
  color: #1f2937;
  font-size: 0.85rem;
  line-height: 1.8;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.pilp-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pilp-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.6rem 1.4rem;
  background: #3468e0;
  border: 0.0625rem solid #3468e0;
  border-radius: 999rem;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pilp-copy-btn:hover {
  opacity: 0.9;
}

.pilp-restart {
  display: block;
  margin: 0;
  padding: 0.6rem 1.4rem;
  background: transparent;
  border: 0.0625rem solid #3468e0;
  border-radius: 999rem;
  color: #3468e0;
  font-weight: 700;
  cursor: pointer;
}

.pilp-result-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  color: #1c9c5f;
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 1.2em;
}

@media (max-width: 48rem) {

  .pilp-panel {
    padding: 1.25rem;
  }

  .pilp-grid {
    grid-template-columns: 1fr;
  }

  .pilp-button {
    width: 100%;
    min-width: auto;
  }

  .pilp-result {
    padding: 1.75rem 1rem 1rem;
  }

}
