/* PDF Form Modal Styles */

.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.pdf-modal.is-open {
  display: flex;
  opacity: 1;
}

.pdf-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(29, 29, 27, 0.8);
  z-index: 1;
}

.pdf-modal-content {
  position: relative;
  background-color: white;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.pdf-modal.is-open .pdf-modal-content {
  transform: scale(1);
}

.pdf-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 3;
}

.pdf-modal-close:hover {
  color: var(--secondary-color);
}

.pdf-modal-body {
  margin-top: 8px;
}

/* Gravity Forms styling inside modal */
.pdf-modal .gform_wrapper {
  margin: 0;
}

.pdf-modal .gform_heading {
  margin-bottom: 24px;
}

.pdf-modal .gform_title {
  font-size: var(--title-M);
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 8px 0;
  line-height: var(--line-height-130);
}

.pdf-modal .gform_description {
  font-size: var(--default-font-size);
  line-height: var(--line-height-175);
  color: var(--primary-color);
  margin: 0;
}

.pdf-modal .gfield_label {
  font-weight: 600;
  color: var(--primary-color);
}

.pdf-modal .gfield_required {
  color: var(--secondary-color);
}

.pdf-modal input[type="text"],
.pdf-modal input[type="email"],
.pdf-modal input[type="tel"],
.pdf-modal textarea,
.pdf-modal select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: var(--default-font-size);
  transition: border-color 0.2s ease;
}

.pdf-modal input[type="text"]:focus,
.pdf-modal input[type="email"]:focus,
.pdf-modal input[type="tel"]:focus,
.pdf-modal textarea:focus,
.pdf-modal select:focus {
  outline: none;
  border-color: var(--secondary-color);
}
 
.gform-field-label a, .gform-field-label a:hover, .gform-field-label a:visited, .gform-field-label a:active {
  color: var(--secondary-color) !important;
}
.pdf-modal .gform_button {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 16px 24px;
  font-size: var(--default-font-size);
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.gform-field-label {
  font-weight: 600 !important;
}
.pdf-modal .gform_button:hover {
  background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.16) 100%
    ),
    #00b3d0;
}

/* Download button in confirmation with SVG icon */
.pdf-modal .gform_confirmation_message .gform_button.button {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 16px 16px 16px 24px;
  font-size: var(--default-font-size);
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline: auto !important;
}

.pdf-modal .gform_confirmation_message .gform_button.button:hover {
  background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.16) 100%
    ),
    #00b3d0;
}

/* Add download icon after button text */
.pdf-modal .gform_confirmation_message .gform_button.button::after {
  content: "" !important;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfNTg2XzY1OSkiPjxwYXRoIGQ9Ik0xNS44MzMyIDcuNUgxMi40OTk4VjIuNUg3LjQ5OTg0VjcuNUg0LjE2NjVMOS45OTk4NCAxMy4zMzMzTDE1LjgzMzIgNy41Wk00LjE2NjUgMTVWMTYuNjY2N0gxNS44MzMyVjE1SDQuMTY2NVoiIGZpbGw9IiMxRDFEMUIiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwMF81ODZfNjU5Ij48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

/* Make button look like a link styled button */
.banner-pdf-demo button.cta {
  background: transparent;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.banner-pdf-demo button.cta:hover {
  background: rgba(0, 179, 208, 0.08);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .pdf-modal-content {
    padding: 24px;
    width: 95%;
    max-height: 85vh;
  }

  .pdf-modal-close {
    top: 12px;
    right: 12px;
  }

  .pdf-modal .gform_button {
    width: 100%;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}
