/**
 * 2013-2026 Eupago, instituição de pagamento LDA
 * Copyright 2007-2026 PrestaShop SA and Contributors
 *
 * This source file is subject to the Academic Free License (AFL 3.0).
 * https://opensource.org/licenses/AFL-3.0
 *
 * @author    Eupago <suporte@eupago.pt>; PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright 2013-2026 Eupago, instituição de pagamento LDA; 2007-2026 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
 */
/*
 * ==========================================================
 * Eupago Gateway - Custom Payment Option Styles
 * Improved Alignment, Uniform Layout, and Responsiveness
 * ==========================================================
 */

/* Scope payment styling to this module, leaving other gateways to the theme. */
.eupago-payment-option {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #d5dfe3;
  border-radius: 8px;
  background: #fff;
}

.eupago-payment-option label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  color: #263e48;
  font-weight: 600;
  cursor: pointer;
}

.eupago-payment-option label > img {
  width: 76px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  margin: 0;
}

.eupago-payment-option:focus-within {
  border-color: #007f91;
  outline: 2px solid #007f91;
  outline-offset: 2px;
}

.eupago-method-guidance {
  margin: 8px 0 12px;
  padding: 12px 16px;
  border-left: 3px solid #007f91;
  border-radius: 4px;
  background: #f0f7f8;
  color: #3c535d;
  font-size: 14px;
  line-height: 1.6;
}

.eupago-method-guidance p {
  margin: 0;
}

/* Floa banner container */
.eupago-floa-banner {
  margin-top: 10px;
  padding-left: 45px;
}

.eupago-floa-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Responsiveness for smaller devices */
@media (max-width: 767px) {
  .eupago-floa-banner {
    padding-left: 30px;
  }

  .eupago-payment-option label > img {
    margin-left: 8px;
  }
}

/* Hosted payment actions, independent of the theme's button defaults. */
.eupago-embedded-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin: 20px 0 16px;
  padding-top: 20px;
  border-top: 1px solid #e3e8eb;
}

.eupago-embedded-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid #a6b6be;
  border-radius: 8px;
  background: #fff;
  color: #263e48;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  box-shadow: 0 2px 4px rgba(30, 55, 65, .08);
  cursor: pointer;
}

.eupago-embedded-actions .btn-primary {
  border-color: #007f91;
  background: #007f91;
  color: #fff;
}

.eupago-embedded-actions .btn-link {
  border-color: #d5dfe3;
  background: #f4f7f8;
  box-shadow: none;
}

.eupago-embedded-actions .btn:hover {
  border-color: #007083;
  background: #eaf4f6;
  color: #17434d;
  text-decoration: none;
}

.eupago-embedded-actions .btn-primary:hover {
  background: #006675;
  color: #fff;
}

.eupago-embedded-actions .btn:focus-visible {
  outline: 3px solid #007f91;
  outline-offset: 3px;
}

.eupago-embedded-actions + p {
  color: #52656e;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 575px) {
  .eupago-embedded-actions {
    flex-direction: column;
  }

  .eupago-embedded-actions .btn {
    width: 100%;
  }
}

.eupago-payment-result {
  margin: 24px 0;
  padding: 28px;
  border-radius: 8px;
  text-align: center;
}

.eupago-payment-result p {
  font-size: 18px;
  line-height: 1.6;
}

.eupago-embedded-checkout [hidden] {
  display: none !important;
}

.eupago-embedded-checkout [aria-busy="true"]::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 3px solid #b7d9df;
  border-top-color: #007f91;
  border-radius: 50%;
  vertical-align: middle;
  animation: eupago-payment-progress 1s linear infinite;
}

@keyframes eupago-payment-progress {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .eupago-embedded-checkout [aria-busy="true"]::before {
    animation: none;
  }
}

.eupago-payment-resume {
  padding: 24px;
  border: 1px solid #d5dfe3;
  border-radius: 8px;
  background: #fff;
}

.eupago-payment-resume dt {
  margin-top: 12px;
  font-size: 14px;
  color: #52656e;
}

.eupago-payment-resume dd {
  margin-bottom: 12px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.eupago-resume-pix {
  padding: 16px;
  background: #f0f7f8;
  font-family: monospace;
}
