/* Basic styles for modal and button */
.ggrm-button {
  display: inline-block;
  padding: 10px 16px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.ggrm-button:hover { background: #1558b0; }

/* Modal visibility and transitions */
.ggrm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
}
.ggrm-modal[aria-hidden="false"] { visibility: visible; }
.ggrm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity .25s ease;
}
.ggrm-modal[aria-hidden="false"] .ggrm-modal__backdrop { opacity: 1; }
.ggrm-modal__dialog {
  position: relative;
  width: 92%;
  max-width: 520px;
  margin: 8vh auto;
  background: #fff;
  /* Add extra right padding so the close button doesn't cover the title */
  padding: 28px 64px 28px 24px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity .25s ease, transform .25s ease;
}
.ggrm-modal[aria-hidden="false"] .ggrm-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.ggrm-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.ggrm-modal__close:hover,
.ggrm-modal__close:focus {
  background: #f3f4f6;
  outline: none;
}
.ggrm-modal h3#ggrm-title {
  margin: 0 0 14px 0;
}
.ggrm-stars { text-align: center; margin: 16px 0 12px; }
.ggrm-star { font-size: 28px; color: #ccc; cursor: pointer; margin: 0 4px; }
.ggrm-star.is-selected { color: #fbbd23; }

.ggrm-field { margin-bottom: 14px; }
.ggrm-field input, .ggrm-field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.ggrm-privacy { font-size: 14px; }
.ggrm-actions { text-align: right; margin-top: 16px; }
.ggrm-submit {
  padding: 8px 14px;
  background: #1a73e8;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.ggrm-message { margin-top: 8px; color: #0a0; }

/* Responsive tweaks */
@media (max-width: 480px) {
  .ggrm-modal__dialog {
    margin: 6vh 16px;
    padding: 22px 56px 22px 18px;
  }
  .ggrm-star { font-size: 24px; }
  .ggrm-modal__close { top: 10px; right: 10px; }
}
