/**
 * DC Woo Shipping Notices — Checkout modal styles.
 *
 * @package DC_Shipping_Destination_Notices
 */

/* ------------------------------------------------------------------ */
/*  Body lock while modal is open                                      */
/* ------------------------------------------------------------------ */
body.dcsn-modal-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------ */
/*  Overlay                                                            */
/* ------------------------------------------------------------------ */
.dcsn-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition:
    background 0.25s ease,
    opacity 0.25s ease;
}

.dcsn-modal-overlay--visible {
  background: rgba(0, 0, 0, 0.5);
  opacity: 1;
}

.dcsn-modal-overlay--closing {
  background: rgba(0, 0, 0, 0);
  opacity: 0;
}

/* ------------------------------------------------------------------ */
/*  Dialog                                                             */
/* ------------------------------------------------------------------ */
.dcsn-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 40px 32px 32px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s ease;
}

.dcsn-modal-overlay--visible .dcsn-modal {
  transform: translateY(0) scale(1);
}

.dcsn-modal-overlay--closing .dcsn-modal {
  transform: translateY(20px) scale(0.96);
}

/* ------------------------------------------------------------------ */
/*  Icon                                                               */
/* ------------------------------------------------------------------ */
.dcsn-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
}

/* ALLOW (amber/warning) */
.dcsn-modal--allow .dcsn-modal__icon {
  background: #fef3c7;
  color: #b45309;
}

/* BLOCK (red/error) */
.dcsn-modal--block .dcsn-modal__icon {
  background: #fee2e2;
  color: #b91c1c;
}

/* ------------------------------------------------------------------ */
/*  Title                                                              */
/* ------------------------------------------------------------------ */
.dcsn-modal__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.dcsn-modal--allow .dcsn-modal__title {
  color: #92400e;
}

.dcsn-modal--block .dcsn-modal__title {
  color: #991b1b;
}

/* ------------------------------------------------------------------ */
/*  Body / messages                                                    */
/* ------------------------------------------------------------------ */
.dcsn-modal__body {
  margin-bottom: 28px;
}

.dcsn-modal__message {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
}

.dcsn-modal__message + .dcsn-modal__message {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.dcsn-modal__message a {
  color: inherit;
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/*  Action buttons                                                     */
/* ------------------------------------------------------------------ */
.dcsn-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dcsn-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.dcsn-modal__btn:active {
  transform: scale(0.98);
}

/* "Continuer" — primary (green/neutral) */
.dcsn-modal__btn--continue {
  background: #059669;
  color: #fff;
}

.dcsn-modal__btn--continue:hover {
  background: #047857;
}

/* "Changer de pays" — secondary */
.dcsn-modal--allow .dcsn-modal__btn--change {
  background: #f3f4f6;
  color: #374151;
}

.dcsn-modal--allow .dcsn-modal__btn--change:hover {
  background: #e5e7eb;
}

/* BLOCK: "Changer de pays" is the primary action */
.dcsn-modal--block .dcsn-modal__btn--change {
  background: #dc2626;
  color: #fff;
}

.dcsn-modal--block .dcsn-modal__btn--change:hover {
  background: #b91c1c;
  color: #fff;
}

/* ------------------------------------------------------------------ */
/*  Method Modal Specifics                                             */
/* ------------------------------------------------------------------ */
.dcsn-modal__confirm-text {
  margin-top: 20px;
  font-size: 16px;
  color: #111827;
}

.dcsn-modal__btn--yes {
  background: #059669;
  color: #fff;
}

.dcsn-modal__btn--yes:hover {
  background: #047857;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 480px) {
  .dcsn-modal {
    padding: 32px 20px 24px;
    border-radius: 12px;
  }

  .dcsn-modal__icon {
    width: 60px;
    height: 60px;
  }

  .dcsn-modal__icon svg {
    width: 36px;
    height: 36px;
  }

  .dcsn-modal__title {
    font-size: 18px;
  }

  .dcsn-modal__message {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------------ */
/*  Product Page Notice Styles                                        */
/* ------------------------------------------------------------------ */
.dcsn-product-shipping-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 15px 0;
  border-radius: 2px;
  background: #f4f4f4;
  font-family: inherit;
  animation: dcsnFadeIn 0.3s ease-out;
}

.dcsn-product-shipping-notice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  flex-shrink: 0;
}

.dcsn-product-shipping-notice__icon svg {
  width: 20px;
  height: 20px;
}

.dcsn-product-shipping-notice__text {
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  font-weight: 500;
}

@keyframes dcsnFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ------------------------------------------------------------------ */
/*  Cart & Checkout Product Notice Styles                             */
/* ------------------------------------------------------------------ */
.dcsn-product-notice-wrapper {
  display: block !important;
  width: 100% !important;
}

.dcsn-product-notice-content {
  display: block !important;
}

.dcsn-block-product-notices-container {
  display: block;
  width: 100%;
  margin-bottom: 24px;
}

.dcsn-product-shipping-notice--block-cart {
  margin: 8px 0;
}
