/* ========================================================
   8. SỔ LƯU BÚT (VIẾT GÌ ĐÓ CHO TỤI MÌNH) & MODAL GỢI Ý LỜI CHÚC
   ======================================================== */
.guestbook-card { text-align: left; }

.guestbook-heading { margin: 0 0 10px; }

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.form-input,
.form-textarea {
  width: 100%;
  border: 2px solid var(--ink-dark);
  border-radius: 10px;
  background: var(--polaroid);
  color: var(--ink-dark);
  outline: none;
  transition: box-shadow 0.2s ease;
}

.guestbook-form .form-input {
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--font-body);
}

/* Lời chúc viết tay trên giấy kẻ dòng */
.guestbook-form .form-textarea {
  padding: 4px 12px;
  font-family: var(--font-hand);
  font-size: 22px !important;
  line-height: 28px;
  background-image: var(--ruled-bg);
  background-attachment: local;
  resize: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: rgba(47, 42, 38, 0.45); }

.form-input:focus,
.form-textarea:focus { box-shadow: var(--hard-shadow); }

.guestbook-actions {
  display: flex;
  gap: 10px;
}

.btn-wish-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink-dark) !important;
  border-radius: 50%;
  background: var(--polaroid);
  color: var(--ink-dark);
  transition: background-color 0.2s ease;
}

.btn-wish-icon:hover { background: var(--note-yellow); }

.btn-submit-wish {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  background: var(--ink-dark);
  color: var(--polaroid);
  font-size: 14px;
}

.btn-submit-wish:hover { background: var(--ink-soft); }

.btn-submit-wish.is-submitting {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

/* Danh sách lời chúc: các tờ note nghiêng xen kẽ */
.wishes-list {
  max-height: 520px;
  margin: 12px -8px 0;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
}

.wishes-list::-webkit-scrollbar { width: 4px; height: 0; }
.wishes-list::-webkit-scrollbar:horizontal { display: none; height: 0; }
.wishes-list::-webkit-scrollbar-track { background: transparent; }
.wishes-list::-webkit-scrollbar-thumb { background: rgba(47, 42, 38, 0.3); border-radius: 4px; }

.wish-item {
  flex-shrink: 0;
  padding: 14px 16px;
  background: var(--note-pink);
  box-shadow: var(--shadow-xs);
  rotate: -1deg;
}

.wish-item:nth-child(4n+2) { background: var(--note-blue); rotate: 1deg; }
.wish-item:nth-child(4n+3) { background: var(--note-yellow); rotate: -0.6deg; }
.wish-item:nth-child(4n+4) { background: var(--note-green); rotate: 0.8deg; }

.wish-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  line-height: 1.7;
}

.wish-author {
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.wish-time {
  flex-shrink: 0;
  color: var(--ink-muted);
  font-variant-numeric: lining-nums;
}

.wish-message {
  margin: 2px 0 0;
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Modal gợi ý lời chúc */
.wish-suggestions-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(47, 42, 38, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.wish-suggestions-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.wish-modal-card {
  width: 100%;
  max-width: 400px;
  padding: 24px 22px 20px;
  border: 2px solid var(--ink-dark);
  border-radius: 14px;
  background-color: var(--paper);
  background-image: var(--dot-bg);
  background-size: var(--dot-size);
  color: var(--ink-dark);
  box-shadow: 5px 5px 0 var(--ink-dark);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.wish-suggestions-modal.open .wish-modal-card { transform: none; }

.wish-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.wish-modal-icon { display: none; }

.wish-modal-title h3 {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.wish-modal-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
  color: var(--ink-dark);
  font-size: 1.1rem;
}

.wish-modal-subtitle {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.wish-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  margin: 0 -6px 16px;
  padding: 4px 6px;
  overflow-y: auto;
}

.wish-suggestion-item {
  padding: 10px 14px;
  background: var(--polaroid);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.wish-suggestion-item:hover { background: var(--note-yellow); }

.wish-modal-footer {
  display: flex;
  gap: 10px;
}

.btn-modal-refresh,
.btn-modal-cancel {
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink-dark) !important;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-modal-refresh {
  background: var(--note-yellow);
  color: var(--ink-dark);
}

.btn-modal-refresh:hover { background: #F8DC7A; }

.btn-modal-cancel {
  background: var(--ink-dark);
  color: var(--polaroid);
}

.btn-modal-cancel:hover { background: var(--ink-soft); }
