/**
 * Styles dla wtyczki Natulojal - Program Lojalnościowy
 */

/* Styl ogólny */
.natulojal-loyalty-status,
.natulojal-cart-loyalty-status,
.natulojal-checkout-loyalty-status,
.natulojal-checkout-natucoins,
.natulojal-dashboard-summary {
  padding: 2em;
  margin-bottom: 2em;
  border-radius: 16px;
  background-color: #f1f3f4;
}

/* Nagłówki */
.natulojal-loyalty-status h3,
.natulojal-cart-loyalty-status h4,
.natulojal-checkout-loyalty-status h3,
.natulojal-checkout-natucoins h3,
.natulojal-dashboard-summary h3 {
  margin-top: 0;
  color: black;
  padding-bottom: 10px;
}

/* Statusy */
.natulojal-loyalty-info,
.natulojal-cart-info,
.natulojal-checkout-info,
.natulojal-dashboard-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

.natulojal-status-item,
.natulojal-cart-item,
.natulojal-checkout-item,
.natulojal-dashboard-item {
  flex: 1;
  min-width: 200px;
  padding: 2em;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
}

.natulojal-status-label,
.natulojal-cart-label,
.natulojal-checkout-label,
.natulojal-item-label {
  display: block;
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}

.natulojal-status-value,
.natulojal-cart-value,
.natulojal-checkout-value,
.natulojal-item-value {
  display: block;
  font-size: 1.2em;
  font-weight: bold;
  color: black;
}

.natulojal-status-value-sub,
.natulojal-item-value-sub {
  font-size: 1em;
  color: #777;
}

.natulojal-cart-description,
.natulojal-checkout-description {
  display: block;
  font-size: 0.9em;
  color: #777;
  margin-top: 5px;
}

.natulojal-summary-content {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-top: 1em;
}

/* Pasek postępu */
.natulojal-progress-bar {
  height: 10px;
  background-color: #eee;
  border-radius: 25px;
  margin: 10px 0;
  overflow: hidden;
}

.natulojal-progress {
  height: 100%;
  background-color: black;
  border-radius: 25px;
}

.natulojal-progress-text {
  font-size: 0.85em;
  color: #666;
}

/* Panel klienta - Zakładka */
.natulojal-loyalty-tab {
  margin-bottom: 30px;
}

.natulojal-sections {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

.natulojal-section {
  padding: 2em;
  margin-bottom: 2em;
  border-radius: 16px;
  background-color: #f1f3f4;
}

.natulojal-explanation-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.natulojal-explanation-item {
  flex: 1;
  min-width: 300px;
}

.natulojal-explanation-item h4 {
  color: black;
  margin-bottom: 10px;
}

.natulojal-explanation-item ul {
  padding-left: 20px;
}

/* Historia natucoinów */
.natulojal-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.natulojal-history-table th,
.natulojal-history-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.natulojal-history-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.natulojal-earned {
  color: #46b450;
  font-weight: 600;
}

.natulojal-spent {
  color: #dc3232;
  font-weight: 600;
}

/* Natucoiny w koszyku i checkoucie */
.natulojal-natucoins-section th {
  padding: 10px 0;
}

/* Style dla formularza natucoinów w koszyku */
.natulojal-natucoins-form {
  margin: 10px 0;
  box-sizing: border-box;
}

.natulojal-natucoins-heading {
  font-weight: 600;
  font-size: 1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

/* Style dla zastosowanych natucoinów */
.natulojal-natucoins-applied {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.natulojal-applied-info {
  flex: 1;
  min-width: 250px;
}

.natulojal-applied-text {
  font-weight: 600;
  color: #46b450;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.natulojal-applied-description {
  font-size: 0.9em;
  color: #666;
}

.natulojal-natucoins-remove {
  display: inline-block !important;
  padding: 1em 2em !important;
  color: white;
  background-color: #6ba505;
  border-radius: 35px;
  transition: transform 0.3s ease;
  font-size: 1em;
  cursor: pointer;
  border: 0;
  width: 100%;
  color: white;
  text-align: center;
}

/* Style dla inputu natucoinów */
.natulojal-natucoins-input {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
}

.natulojal-input-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1em;
}

.natulojal-input-field {
  flex: 1;
  min-width: 200px;
}

.natulojal-input-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 1em;
}

.natulojal-natucoins-number-input {
  width: 100% !important;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1em;
  text-align: center;
  transition: border-color 0.3s ease;
}

.natulojal-natucoins-number-input:hover {
  border-color: black;
}

.natulojal-natucoins-number-input.natulojal-input-focused {
  border-color: black;
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 109, 185, 0.1);
}

.natulojal-natucoins-number-input.natulojal-input-max {
  border-color: #46b450;
}

.natulojal-natucoins-number-input.natulojal-input-error {
  border-color: #dc3232;
}

.natulojal-natucoins-number-input.natulojal-input-normal {
  border-color: black;
}

.natulojal-input-hint {
  font-size: 0.85em;
  color: #666;
  margin-top: 5px;
  text-align: center;
}

.natulojal-input-button {
  /* Kontener dla przycisku */
}

.natulojal-natucoins-apply {
  display: inline-block !important;
  padding: 1em 2em !important;
  color: white;
  background-color: #6ba505;
  border-radius: 35px;
  transition: transform 0.3s ease;
  font-size: 1em;
  cursor: pointer;
  border: 0;
  width: 100%;
}

.natulojal-natucoins-apply:hover {
  transform: translateY(-5px);
}

.natulojal-input-tip {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9em;
  color: #666;
  text-align: center;
}

/* Animacja spin */
.natulojal-spin {
  animation: natulojal-spin 1s linear infinite;
}

@keyframes natulojal-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pozostałe style - bez zmian */
.natulojal-checkout-natucoins {
  margin-bottom: 20px;
}

.natulojal-checkout-natucoins-content {
  padding: 15px;
  background-color: #f1f3f4;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.natulojal-checkout-natucoins-heading {
  font-weight: 600;
  margin-bottom: 10px;
}

.natulojal-checkout-natucoins-applied {
  display: flex;
  align-items: center;
  gap: 10px;
}

.natulojal-checkout-natucoins-remove {
  color: #dc3232;
  text-decoration: none;
}

.natulojal-checkout-natucoins-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.natulojal-checkout-natucoins-input label {
  flex: 1;
  min-width: 200px;
}

.natulojal-checkout-natucoins-input input {
  flex: 1;
  min-width: 80px;
}

/* Darmowe produkty */
.natulojal-free-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.natulojal-free-product {
  border: 1px solid #ddd;
  border-radius: 25px;
  padding: 15px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.natulojal-free-product:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.natulojal-free-product-image {
  text-align: center;
  margin-bottom: 10px;
}

.natulojal-free-product-image img {
  max-width: 100%;
  height: auto;
}

.natulojal-free-product-info h4 {
  margin-top: 0;
  font-size: 1em;
  color: #333;
}

.natulojal-free-product-price {
  margin: 10px 0;
}

.natulojal-free-product-price .price {
  font-weight: 600;
  color: black;
  text-decoration: line-through;
  margin-right: 5px;
}

.natulojal-free-product-price .coins {
  font-size: 0.9em;
  color: #46b450;
}

.natulojal-redeem-button {
  width: 100%;
  padding: 8px 12px;
  background-color: black;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.natulojal-redeem-button:hover {
  background-color: #1e5794;
}

.natulojal-redeem-button.disabled {
  background-color: #ddd;
  color: #777;
  cursor: not-allowed;
}

/* Dashboard */
.natulojal-dashboard-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.natulojal-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #6ba505;
  border-radius: 50%;
}

.natulojal-item-icon .dashicons {
  color: #fff;
}

.natulojal-dashboard-link {
  margin-top: 15px;
  text-align: center;
}

/* Fix dla dashicons w natulojal */
.natulojal-natucoins-section .dashicons {
  width: auto;
  height: auto;
  font-size: inherit;
}

/* Responsywność */
@media (max-width: 768px) {
  .natulojal-loyalty-info,
  .natulojal-cart-info,
  .natulojal-checkout-info,
  .natulojal-dashboard-info {
    flex-direction: column;
  }

  .natulojal-free-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .natulojal-natucoins-input,
  .natulojal-checkout-natucoins-input {
    flex-direction: column;
    align-items: flex-start;
  }

  .natulojal-natucoins-input input,
  .natulojal-checkout-natucoins-input input {
    width: 100%;
  }

  /* Mobile styles dla natucoinów w koszyku */
  .natulojal-natucoins-applied {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .natulojal-input-container {
    flex-direction: column;
    align-items: stretch;
  }

  .natulojal-natucoins-apply {
    width: 100%;
    margin-top: 10px;
  }
}
