/* SmartLab Postcards – Multi Comune (MVP)
   Minimal, responsive, 2-step UI
*/

.slp-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.slp-title {
  margin: 0 0 12px 0;
}

.slp-notice {
  padding: 10px 12px;
  border: 1px solid;
  margin: 10px 0;
  border-radius: 6px;
}

.slp-notice--success {
  border-color: #46b450;
  background: #ecf7ed;
}

.slp-notice--error {
  border-color: #dc3232;
  background: #fbeaea;
}

/* Step blocks */
.slp-step {
  margin-top: 10px;
}

/* Grid of postcards */
.slp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* Each postcard is a button for accessibility */
.slp-card {
  appearance: none;
  -webkit-appearance: none;

  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;

  background: #fff;
  cursor: pointer;
  text-align: left;

  display: flex;
  flex-direction: column; /* title below image */
  gap: 8px;

  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}

.slp-card:hover {
  border-color: #c9c9c9;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.slp-card:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

.slp-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Title always under */
.slp-card__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

/* Step 2 preview */
.slp-preview {
  margin: 10px 0 14px 0;
}

.slp-preview img {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
}

/* Form */
.slp-form p {
  margin: 0 0 12px 0;
}

.slp-form input[type="text"],
.slp-form input[type="email"],
.slp-form textarea {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
}

.slp-form textarea {
  max-width: 720px;
}

.slp-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.slp-actions button {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #dcdcde;
  background: #f6f7f7;
  cursor: pointer;
}

.slp-actions .slp-submit {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.slp-actions .slp-submit:hover {
  background: #1e639a;
  border-color: #1e639a;
}

.slp-actions .slp-back:hover {
  background: #ececec;
}

/* Honeypot: hidden off-screen */
.slp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}