/**
 * 2025 Magic Garden
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 *
 * @author    Magic Garden <contact@magicgarden.fr>
 * @copyright 2025 Magic Garden
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* Styles pour la page de crédit client */
.credit-account-summary,
.credit-transaction-history {
    margin-bottom: 30px;
}

.credit-account-summary .card,
.credit-transaction-history .card {
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.credit-account-summary .card-header,
.credit-transaction-history .card-header {
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.credit-account-summary .card-body,
.credit-transaction-history .card-body {
    padding: 10px 0;
}

.credit-balance {
    margin-bottom: 20px;
}

.credit-amount .badge {
    font-size: 1.2rem;
    padding: 8px 15px;
}

.credit-info p {
    margin-bottom: 10px;
}

.card-header .card-title,
.credit-account-summary .card-body {
	padding: 3px 15px 2px;
	margin: 0;
}

/* Style pour le lien dans le compte client */
#credit-link .credit-amount {
    display: block;
    margin-top: 5px;
    font-weight: bold;
    color: #2fb5d2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .credit-account-summary .card,
    .credit-transaction-history .card {
        padding: 10px;
    }
    
    .table-responsive {
        padding: 0;
    }
}

/* Mixed payment block (customercredit) */
#customercredit-mixed {
  border: 1px solid #e3f2f8;
  background-color: #f7fbfd;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

#customercredit-mixed .customercredit-mixed-header {
  margin: 0 0 8px 0;
}

#customercredit-mixed .customercredit-mixed-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2f6f81;
}

#customercredit-mixed .customercredit-mixed-note {
  margin: 6px 0 0;
  color: #60707a;
  font-size: .9rem;
}

#customercredit-mixed .customercredit-mixed-sep {
  margin: 10px 0 14px;
  border: 0;
  border-top: 1px dashed #cfe8f1;
}

#customercredit-mixed .payment-option {
  margin-bottom: 0;
}

#customercredit-mixed .payment-option .payment-option-title,
#customercredit-mixed .payment-option .custom-radio {
  align-items: center;
}


body#checkout #customercredit-mixed .additional-information {
	margin-top: 0.25rem;
}

/* Customer Credit toggle (checkout) */
.customercredit-toggle {
  border: 1px solid #e3f2f8;
  background-color: #f7fbfd;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0px 24px -10px;
}

.customercredit-toggle .cc-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
  margin: 0;
}

.customercredit-toggle #cc-credit-info {
  margin-left: auto;
  font-size: .9rem;
  color: #60707a;
}

/* Make the toggle more visible */
.customercredit-toggle .cc-toggle-row input#cc-use-credit {
  transform: scale(1.35);
  transform-origin: center left;
  /* modern browsers: colorize native checkbox to theme */
  accent-color: #2fb5d2;
}

.customercredit-toggle .cc-toggle-row span:first-of-type {
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 576px) {
  .customercredit-toggle .cc-toggle-row input#cc-use-credit {
    transform: scale(1.5);
  }
  .customercredit-toggle .cc-toggle-row span:first-of-type {
    font-size: 1.1rem;
  }
}

.cc-remaining-hint {
  background: #fff7e6;
  border-left: 3px solid #ffcf66;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 8px 0 10px;
  color: #6a5314;
  font-weight: 600;
}