@font-face {
  font-family: 'Journal';
  src: url('journal.eot');
  src: url('journal.eot?#iefix') format('embedded-opentype'),
       url('journal.woff') format('woff'),
       url('journal.ttf') format('truetype'),
       url('journal.svg#JournalRegular') format('svg');
  font-weight: normal;
  font-style: normal;
}

/* Enhanced Signature Section Styling */
.signature-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.signature-title {
  color: #495057;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
  display: inline-block;
}

.signature-pad-container {
  position: relative;
}

.sigPad {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  border: 3px solid #007bff;
  border-radius: 8px;
  background: white;
  overflow: hidden;
  position: relative;
}

.sigPad label {
  display: block;
  margin: 0 0 0.515em;
  padding: 0;
  color: #000;
  font: italic normal 1em/1.375 Georgia,Times,serif;
}

.sigPad label.error {
  color: #f33;
}

.sigPad input {
  margin: 0;
  padding: 0.2em 0;
  width: 198px;

  border: 1px solid #666;

  font-size: 1em;
}

.sigPad input.error {
  border-color: #f33;
}

.sigPad button {
  margin: 1em 0 0 0;
  padding: 0.6em 0.6em 0.7em;

  background-color: #ccc;
  border: 0;
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
  border-radius: 8px;

  cursor: pointer;

  color: #555;
  font: bold 1em/1.375 sans-serif;
  text-align: left;
}

.sigPad button:hover {
  background-color: #333;

  color: #fff;
}

.sig {
  display: none;
}

.sigNav {
  display: none;
  height: 2.25em;
  margin: 0;
  padding: 0;
  position: relative;

  list-style-type: none;
}

.sigNav li {
  display: inline;
  float: left;
  margin: 0;
  padding: 0;
}

.sigNav a,
.sigNav a:link,
.sigNav a:visited {
  display: block;
  margin: 0;
  padding: 0 0.6em;

  border: 0;

  color: #333;
  font-weight: bold;
  line-height: 2.25em;
  text-decoration: underline;
}

.sigNav a.current,
.sigNav a.current:link,
.sigNav a.current:visited {
  background-color: #666;
  -moz-border-radius-topleft: 8px;
  -moz-border-radius-topright: 8px;
  -webkit-border-top-left-radius: 8px;
  -webkit-border-top-right-radius: 8px;
  border-radius: 8px 8px 0 0;

  color: #fff;
  text-decoration: none;
}

.sigNav .typeIt a.current,
.sigNav .typeIt a.current:link,
.sigNav .typeIt a.current:visited {
  background-color: #ccc;

  color: #555;
}

.sigNav .clearButton {
  bottom: 0.2em;
  display: none;
  position: absolute;
  right: 0;

  font-size: 0.75em;
  line-height: 1.375;
}

.sigPad .sigWrapper {
  clear: both;
  height: auto;
  min-height: 200px;
  border: none !important;
  background: white;
  position: relative;
}

.sigWrapper.current {
  border: none !important;
}

.signed .sigWrapper {
  border: 0;
}

.sigPad canvas.pad {
  position: relative;
  width: 100% !important;
  height: 200px !important;
  border: none;
  background: white;
  display: block;
  cursor: crosshair;
  touch-action: none;
  -ms-touch-action: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.sigPad .typed {
  display: none !important;
}

.sigPad .sigNav {
  display: none !important;
}

.typeItDesc,
.drawItDesc {
  display: none;
  margin: 0.75em 0 0.515em;
  padding: 0.515em 0 0;

  border-top: 3px solid #ccc;

  color: #000;
  font: italic normal 1em/1.375 Georgia,Times,serif;
}

/* Clear Button Styling */
.signature-controls {
  margin-top: 10px;
}

.clearButton {
  margin: 0 !important;
}

.clearButton a {
  text-decoration: none;
}

/* Error and Validation Styling */
.signature-error {
  border-color: #dc3545 !important;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.signature-invalid-feedback {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 5px;
}

p.error {
  display: block;
  margin: 0.5em 0;
  padding: 0.4em;
  background-color: #f33;
  color: #fff;
  font-weight: bold;
}



/* Responsive Design */
@media (max-width: 992px) {
  .sigPad canvas.pad {
    height: 180px !important;
  }
}

@media (max-width: 768px) {
  .signature-section {
    padding: 15px;
    margin: 15px 0;
  }

  .signature-title {
    font-size: 1.1rem;
  }

  .sigPad canvas.pad {
    height: 150px !important;
  }

  .signature-controls {
    flex-direction: column;
    text-align: center;
  }

  .signature-controls .clearButton {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .sigPad canvas.pad {
    height: 120px !important;
  }

  .signature-section {
    padding: 10px;
  }
}
