/* Allegro Lokalnie checkout appearance */
.page--allegro-checkout {
  background: #f0f2f5;
}

.allegro-header {
  background: #fff;
  padding: 12px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.allegro-header__logo {
  display: inline-block;
  text-decoration: none;
}

.allegro-header__logo-img {
  height: 24px;
  width: auto;
  max-height: 28px;
  display: block;
  object-fit: contain;
  vertical-align: middle;
}

.allegro-checkout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.allegro-checkout__main {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .allegro-checkout__main {
    grid-template-columns: 1fr;
  }
}

.allegro-checkout__left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.allegro-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.allegro-card__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #212121;
}

.allegro-card__subtitle {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #757575;
}

.allegro-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.allegro-card__row .allegro-card__title {
  margin-bottom: 0;
}

/* Order notes */
.allegro-notes__textarea-container--hidden {
  display: none;
}

.allegro-notes__textarea-container {
  margin-top: 12px;
}

.allegro-notes__textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.allegro-notes__textarea:focus {
  outline: none;
  border-color: #00a790;
  box-shadow: 0 0 0 2px rgba(0, 167, 144, 0.2);
}

.allegro-notes__textarea::placeholder {
  color: #999;
}

.allegro-btn--hidden {
  display: none !important;
}

.allegro-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #00a790;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.allegro-btn--tertiary {
  border: 1px solid #ddd;
  background: #fff;
  color: #00a790;
}

.allegro-btn--tertiary:hover {
  border-color: #00a790;
  background: #f5faf9;
}

.allegro-btn--secondary {
  background: #f5f5f5;
  color: #212121;
  margin-top: 12px;
}

.allegro-btn--secondary:hover {
  background: #eee;
}

.allegro-btn--primary {
  background: #6b4ee6;
  color: #fff;
  padding: 14px 24px;
  width: 100%;
}

.allegro-btn--primary:hover {
  background: #5a3fd4;
}

.allegro-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #9e8ce8;
}

.allegro-btn--primary:disabled:hover {
  background: #9e8ce8;
}

.allegro-btn--orange {
  background: #ff5a00;
  color: #fff;
  padding: 14px 24px;
}

.allegro-btn--orange:hover {
  background: #e54e00;
}

.allegro-btn--full {
  width: 100%;
}

.allegro-link {
  font-size: 0.9rem;
  color: #00a790;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 12px;
}

.allegro-link:hover {
  color: #008673;
}

.allegro-link--block {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}

/* Item row */
.allegro-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px dashed #e0e0e0;
}

.allegro-item__photo {
  width: 80px;
  height: 80px;
  min-width: 80px;
  background: #f5f5f5;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.allegro-item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.allegro-item__photo-placeholder {
  font-size: 2rem;
  color: #999;
}

.allegro-item__info {
  flex: 1;
  min-width: 0;
}

.allegro-item__title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.allegro-item__meta {
  font-size: 0.85rem;
  color: #757575;
  margin-bottom: 4px;
}

.allegro-item__price {
  font-weight: 700;
  font-size: 1rem;
}

/* Address block (saved address display, like Allegro) */
.allegro-address-block-container--hidden {
  display: none;
}

.allegro-address-form--hidden {
  display: none;
}

.allegro-address-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}

.allegro-address-block__radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #00a790;
  background: #00a790;
  box-shadow: inset 0 0 0 4px #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.allegro-address-block__content {
  flex: 1;
  min-width: 0;
}

.allegro-address-block__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #212121;
  margin-bottom: 4px;
}

.allegro-address-block__line {
  font-size: 0.9rem;
  color: #757575;
  margin-bottom: 2px;
}

.allegro-address-block__phone {
  font-size: 0.9rem;
  color: #757575;
}

.allegro-address-block__edit {
  flex-shrink: 0;
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #00a790;
  border-radius: 4px;
}

.allegro-address-block__edit:hover {
  background: #f0f9f7;
}

/* Address card (form) */
.allegro-address-card {
  border: 2px solid #00a790;
  border-radius: 8px;
  padding: 16px;
  background: #f9fffe;
  margin-bottom: 8px;
}

.allegro-address-card__content {
  display: flex;
  gap: 12px;
}

.allegro-address-card__fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.allegro-input {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}

.allegro-input:focus {
  outline: none;
  border-color: #00a790;
  box-shadow: 0 0 0 2px rgba(0, 167, 144, 0.2);
}

.allegro-input--inline {
  width: 100%;
}

.allegro-address-card__row {
  display: flex;
  gap: 8px;
}

.allegro-input--short {
  flex: 0 0 80px;
}

/* Delivery card */
.allegro-delivery-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}

.allegro-delivery-card--selected {
  border-color: #00a790;
  background: #f9fffe;
}

.allegro-delivery-card__radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #00a790;
  background: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.allegro-delivery-card--selected .allegro-delivery-card__radio {
  background: #00a790;
  box-shadow: inset 0 0 0 4px #fff;
}

.allegro-delivery-card__info {
  flex: 1;
}

.allegro-delivery-card__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.allegro-delivery-card__meta {
  font-size: 0.85rem;
  color: #757575;
  margin-top: 4px;
}

.allegro-delivery-card__price {
  font-weight: 600;
}

.allegro-icon {
  margin-right: 4px;
}

.allegro-icon--pin {
  font-size: 0.9rem;
}

/* Pickup section */
.allegro-pickup__selected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f0fdf9;
  border-radius: 6px;
  border: 1px solid #00a790;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.allegro-pickup__selected--hidden,
.allegro-pickup__tip.allegro-pickup__selected--hidden {
  display: none;
}

.allegro-pickup__tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f0f7ff;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.allegro-icon--info {
  font-size: 1rem;
}

/* Sidebar summary */
.allegro-sidebar {
  position: sticky;
  top: 80px;
}

.allegro-summary__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.allegro-summary__total {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.allegro-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.allegro-summary__divider {
  height: 1px;
  background: #e5e7eb;
  margin: 12px 0;
}

.allegro-summary__delivery {
  font-size: 0.9rem;
  color: #757575;
  margin-bottom: 12px;
}

.allegro-summary__delivery span:first-child {
  display: block;
  margin-bottom: 4px;
}

.allegro-summary__methods {
  font-size: 0.9rem;
  color: #757575;
  margin-bottom: 16px;
}

.allegro-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.85rem;
}

.allegro-payment-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.allegro-payment-method__icon {
  width: 32px;
  height: 24px;
  object-fit: contain;
}

.allegro-payment-method--disabled {
  opacity: 0.5;
  filter: grayscale(1);
}

.allegro-payment-method--disabled span {
  color: #999;
}

.allegro-payment-method--disabled small {
  font-size: 0.75rem;
  color: #999;
}

.allegro-payment-method--active {
  font-weight: 600;
}

.allegro-protection {
  margin-top: 16px;
}

.allegro-protection__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.allegro-protection__text {
  font-size: 0.9rem;
  color: #757575;
  margin: 0;
}

/* Modal */
.allegro-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.allegro-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.allegro-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.allegro-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}

.allegro-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.allegro-modal__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.allegro-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: #757575;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.allegro-modal__close:hover {
  color: #212121;
}

.allegro-modal__body {
  padding: 24px;
}

.allegro-blik-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: #f0f7ff;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.allegro-blik-info a {
  color: #0e46a4;
  text-decoration: underline;
}

.allegro-blik-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.allegro-blik-form__label {
  font-size: 0.95rem;
  font-weight: 600;
}

.allegro-blik-form__input {
  padding: 12px 16px;
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.allegro-blik-form__input:focus {
  outline: none;
  border-color: #ff5a00;
  box-shadow: 0 0 0 2px rgba(255, 90, 0, 0.2);
}

.allegro-blik-form__hint {
  font-size: 0.85rem;
  color: #757575;
  margin: 0;
}

/* Awaiting confirmation overlay */
.allegro-awaiting {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.allegro-awaiting[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.allegro-awaiting__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.allegro-awaiting__box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 32px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.allegro-awaiting__spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border: 4px solid #e5e7eb;
  border-top-color: #ff5a00;
  border-radius: 50%;
  animation: allegro-spin 0.8s linear infinite;
}

@keyframes allegro-spin {
  to { transform: rotate(360deg); }
}

.allegro-awaiting__text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #212121;
}