/* ==========================================================================
   Station Agreement CSS
   Styles for Station Information, Sign Agreement, and Purchase Agreement pages
   ========================================================================== */

/* ==========================================================================
   Sign Station Agreement Form
   ========================================================================== */

.edit-ach-button,
.edit-card-button {
  margin-bottom: 20px;
}

.field-validation-error {
  font-size: 14px;
  margin-left: 10px;
}

.payment-method legend {
  font-size: 20px;
  background: white;
  display: inline-block;
  width: auto;
  padding: 0px 20px;
}

/* ==========================================================================
   PDF Layout Styles (for _PDFLayout.cshtml)
   ========================================================================== */

/* PDF-specific h3 styling */
.contract-text h3 {
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  border: 0px;
}

/* Smaller form fields in PDF */
div.form--fields {
  font-size: 11px !important;
}

/* Hide numeric input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox and standard */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.contract-text p,
.contract-text li {
  font-size: 14.8px !important;
}

/* ==========================================================================
   Station Information DevExtreme Overrides
   ========================================================================== */

.dx-texteditor-input {
  background: #F5F5F2;
}

.dx-field-item-label-content {
  font-weight: 500;
}

/* Card expiration month/year - compact label width */
.expiry-field .dx-field-item-label {
  width: auto;
  min-width: 50px;
}

/* ==========================================================================
   Utah County Purchase Agreement
   ========================================================================== */

.agreement-page-title {
  border-bottom: 1px dotted #aaa;
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.utah-county-agreement-header {
  font-weight: bold;
  font-size: 16px;
  text-decoration: underline;
  text-transform: uppercase;
  text-align: center;
}

/* ==========================================================================
   Facility Information Section
   ========================================================================== */

.facility-info-container {
  margin-top: 40px;
  margin-bottom: 45px;
  font-weight: bold;
}

.facility-info-label {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.facility-info-value {
  background: var(--color-border);
  padding: 5px;
  display: flex;
  align-items: center;
}

.facility-info-value-normal {
  font-weight: normal;
}

/* Facility info - uses Bootstrap grid (col-12 col-md-4/8) for responsive stacking */
.facility-info-form-group.row {
  margin-bottom: 0.75rem;
}

/* Mobile: reduce row gutters */
@media only screen and (max-width: 767.98px) {
  .facility-info-form-group.row {
    margin-left: 0;
    margin-right: 0;
  }

  .facility-info-form-group .facility-info-label,
  .facility-info-form-group .facility-info-value {
    padding-left: 0;
    padding-right: 0;
  }

  .facility-info-form-group .facility-info-label {
    margin-bottom: 0.25rem;
  }

  .facility-info-form-group .facility-info-value {
    margin-bottom: 0.5rem;
  }
}

/* ==========================================================================
   Station Information Page
   ========================================================================== */

.alert.alert-warning.station-info-alert {
  margin-top: 20px;
  margin-bottom: 30px;
}

.station-error-text {
  color: red;
}

/* Button containers */
.station-edit-button-container,
.station-edit-button-container-no-margin {
  float: right;
}

.station-edit-button-container-no-margin {
  margin-top: 0;
}

/* Section headings */
.station-section-heading-general,
.station-section-heading {
  font-size: 26px;
  padding-bottom: 20px;
}

.station-section-heading-general {
  margin-bottom: 30px;
  border-bottom: 1px solid #bbb;
}

.station-section-heading {
  margin-top: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.station-section-spacer {
  margin-top: 40px;
}

/* Form container */
.station-form-container {
  border: 1px solid #ccc;
  border-radius: 13px;
  padding: 25px;
  margin-bottom: 40px;
}

.station-ach-acknowledgement {
  opacity: 0.6;
}

/* Credit Card accepted cards - display below heading */
.station-cc-accepted {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.station-credit-card-image {
  max-height: 60px;
}

.station-credit-card-info-text {
  font-size: 14px;
  font-weight: 200;
}

.station-submit-button-container {
  text-align: right;
}

.station-submit-button {
  float: right;
  margin-bottom: 60px;
}

.station-clear-float {
  clear: both;
}

.station-modal-iframe-container {
  height: 600px;
}

.station-modal-iframe {
  height: 600px;
  width: 100%;
}

/* ==========================================================================
   Attachment Styles (A & B)
   ========================================================================== */

.attachment-title-main {
  margin-top: 30px;
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 16px;
  text-decoration: underline;
  text-align: center;
}

.attachment-title-sub {
  font-weight: bold;
  font-size: 14px;
  text-align: center;
}

.attachment-paragraph {
  font-size: 15px;
}

.attachment-table-container {
  margin-left: 3em;
  margin-top: 30px;
}

.attachment-table {
  font-size: 15px;
  width: 100%;
  table-layout: auto;
}

.attachment-table-cell-70 {
  width: 70%;
  padding-bottom: 30px;
}

.attachment-table-cell-30 {
  width: 30%;
  padding-bottom: 30px;
}

/* Indented list for legal document sections (ol/ul under numbered items) */
.attachment-list-indented {
  margin-left: 40px;
}

.attachment-paragraph-indented {
  width: 100%;
  max-width: 100%;
}

.attachment-payment-heading {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.attachment-payment-methods {
  margin-left: 3em;
  margin-top: 30px;
  font-size: 14px;
}

.attachment-payment-methods > div {
  margin-bottom: 8px;
}

.attachment-note-paragraph {
  margin-top: 40px;
  font-size: 14px;
  width: 100%;
  max-width: 100%;
}

/* Attachment B Table */
.attachment-b-table {
  font-size: 14px;
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
}

.attachment-b-table th {
  font-weight: bold;
  text-align: left;
  padding: 10px 5px;
  border-bottom: 2px solid #333;
}

.attachment-b-table-cell {
  padding: 8px 5px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}

.attachment-b-total-row {
  border-top: 2px solid #333;
}

.attachment-b-total-row td {
  padding-top: 10px;
  font-weight: bold;
}

/* ==========================================================================
   Payment Method Section
   ========================================================================== */

.payment-method-section {
  margin-top: 70px;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 16px;
  text-decoration: underline;
  text-align: center;
}

.payment-radio-item {
  font-size: 17px;
}

.payment-radio-input {
  vertical-align: bottom;
  width: 20px;
  height: 20px;
  margin-right: 29px;
}

.method-ach-form {
  padding: 30px;
}

/* Shared card style for payment method forms */
.payment-form-card {
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
  border-radius: 6px;
}

.credit-card-image {
  max-width: 180px;
  margin-bottom: 15px;
}

.cvv-input {
  max-width: 100px;
}

.cvv-icon {
  margin-left: 15px;
  width: 50px;
  float: right;
}

/* ==========================================================================
   Total Cost Section
   ========================================================================== */

.total-cost-section {
  margin-top: 40px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.total-cost-title {
  font-weight: bold;
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.equipment-cost-container {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: var(--color-border-light);
  margin-bottom: 20px;
}

.equipment-cost-label {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--color-text-muted);
}

.equipment-cost-table {
  width: 100%;
  font-size: 15px;
}

.equipment-cost-table-cell {
  padding: 5px 0;
}

.equipment-cost-table-cell-right {
  text-align: right;
}

.equipment-cost-total-row {
  border-top: 2px solid #999;
}

.equipment-cost-total-cell {
  padding: 8px 0 5px 0;
  font-weight: bold;
}

.equipment-cost-total-amount {
  padding: 8px 0 5px 0;
  text-align: right;
  font-weight: bold;
  font-size: 16px;
}

/* Payment Due Box */
.payment-due-container {
  padding: 20px;
  border: 3px solid var(--color-payment-primary);
  border-radius: 8px;
  background: var(--color-payment-bg);
}

.payment-due-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--color-payment-primary);
}

.payment-due-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.payment-due-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-top: 2px solid var(--color-payment-primary);
  padding-top: 10px;
}

.payment-due-main-label {
  font-size: 18px;
  font-weight: bold;
}

.payment-due-main-amount {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-payment-primary);
}

.payment-due-note {
  font-size: 13px;
  font-style: italic;
  text-align: center;
  color: #555;
  border-top: 1px solid #bbb;
  padding-top: 10px;
}

.payment-due-label {
  font-size: 15px;
  color: var(--color-payment-primary);
}

.payment-due-amount {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-payment-primary);
}

/* ==========================================================================
   Contract Acknowledgement
   ========================================================================== */

.contract-acknowledgement-group {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.contract-acknowledgement-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: normal;
  cursor: pointer;
}

.contract-acknowledgement-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.contract-acknowledgement-label {
  font-size: 14px;
  vertical-align: middle;
}

/* Double-size checkbox used in agreement forms */
.double-size-checkbox {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

/* Hide empty validation error containers */
.form-errors:has(span:empty) {
  display: none;
}

/* ==========================================================================
   Content Title (Agreement Sections)
   ========================================================================== */

.ContentTitle {
  font-weight: bold;
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 15px;
}

.attachment-title-sub-font {
  font-size: 14px;
}

/* ==========================================================================
   Mobile Responsive Styles (max-width: 768px)
   ========================================================================== */

@media only screen and (max-width: 768px) {
  /* Headers */
  .utah-county-agreement-header,
  .sign-agreement-title {
    font-size: 14px !important;
  }

  /* Credit Card accepted cards - stack on mobile */
  .station-cc-accepted {
    flex-direction: column;
    align-items: flex-start;
  }

  .station-credit-card-image {
    max-height: 40px;
  }

  .station-credit-card-info-text {
    display: block;
    margin-top: 5px;
  }

  /* ACH Section - Stack controls */
  .method-ach-section {
    width: 100%;
    max-width: 100%;
    padding: 20px 15px;
  }

  .method-ach__existing.method-ach-form {
    width: 100%;
    max-width: 100%;
    padding: 20px 15px;
  }

  /* Stack form groups vertically */
  .method-ach__existing.method-ach-form .form-group {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
  }

  .method-ach__existing.method-ach-form label {
    display: block !important;
    width: 100% !important;
    flex-basis: auto !important;
    margin-right: 0 !important;
    margin-bottom: 8px !important;
  }

  .method-ach__existing.method-ach-form input:not([type="checkbox"]),
  .method-ach__existing.method-ach-form select {
    width: 100% !important;
    max-width: 100% !important;
    flex-grow: 0 !important;
  }

  /* Facility Information - enable wrapping */
  .no-input-borders .facility-info-form-group {
    flex-wrap: wrap;
  }

  .no-input-borders .facility-info-form-group > div:first-of-type {
    white-space: normal;
  }

  /* Attachment containers */
  .attachment-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin-left: 0;
    padding-left: 15px;
    padding-right: 15px;
  }

  .attachment-table,
  .attachment-b-table {
    font-size: 14px;
    min-width: 100%;
  }

  .expiry-month-mm-yy-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  .ContentTitle {
    font-size: 14px !important;
    padding: 0 15px !important;
  }

  .ContentTitle.attachment-title-sub-font {
    padding: 0 15px !important;
  }

  .attachment-paragraph-indented,
  .attachment-note-paragraph {
    max-width: 100%;
  }

  /* DevExtreme form grid override for mobile */
  /* !important needed: Overrides DevExtreme ColCount grid layout */
  [id^="StationInformationForm--"] .dx-form-group-content,
  [id^="BankInformationForm--"] .dx-form-group-content,
  [id^="CardInformationForm--"] .dx-form-group-content {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  [id^="StationInformationForm--"] .dx-field-item,
  [id^="BankInformationForm--"] .dx-field-item,
  [id^="CardInformationForm--"] .dx-field-item {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: block !important;
  }

  /* Mobile payment adjustments */
  .attachment-payment-heading {
    padding-left: 0;
    padding-right: 0;
  }

  .attachment-payment-methods {
    margin-left: 0;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .attachment-note-paragraph {
    padding-left: 0;
    padding-right: 0;
  }

  .attachment-table-container.px-0 {
    padding-left: 0;
    padding-right: 0;
  }
}
