/**
 * Delivery Popup Styles — Add-to-Cart Modal
 * Matches the existing shipping modal style in product.css
 *
 * @package MK_Piano_Shipping
 */

/* ============================================
   Popup Overlay
   ============================================ */

.mk-delivery-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 16px;
  box-sizing: border-box;
}

.mk-delivery-popup-overlay.active {
  opacity: 1;
}

/* ============================================
   Popup Container
   ============================================ */

.mk-delivery-popup {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-height: 90vh;
  overflow-y: auto;
}

.mk-delivery-popup-overlay.active .mk-delivery-popup {
  transform: translateY(0);
}

/* ============================================
   Close Button
   ============================================ */

.mk-delivery-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #6b7280;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.mk-delivery-popup__close:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

/* ============================================
   Header
   ============================================ */

.mk-delivery-popup__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mk-delivery-popup__icon {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  flex-shrink: 0;
}

.mk-delivery-popup__title {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a !important;
  margin: 0 !important;
  letter-spacing: -0.02em;
}

/* ============================================
   Product Confirmation
   ============================================ */

.mk-delivery-popup__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
}

.mk-delivery-popup__product-image {
  flex-shrink: 0;
}

.mk-delivery-popup__product-image img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.mk-delivery-popup__product-name {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

/* ============================================
   Description
   ============================================ */

.mk-delivery-popup__desc {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 0.875rem;
  color: #6b7280 !important;
  line-height: 1.5;
  margin: 0 0 20px 0 !important;
}

/* ============================================
   Form Fields
   ============================================ */

.mk-delivery-popup__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mk-delivery-popup__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mk-delivery-popup__field label {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1a1a !important;
}

.mk-delivery-popup__field select,
.mk-delivery-popup__field input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 1rem;
  background: #ffffff;
  color: #1a1a1a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.mk-delivery-popup__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.mk-delivery-popup__field select:hover,
.mk-delivery-popup__field input:hover {
  border-color: #000000;
}

.mk-delivery-popup__field select:focus,
.mk-delivery-popup__field input:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.mk-delivery-popup__field input[type="number"] {
  -moz-appearance: textfield;
}

.mk-delivery-popup__field input[type="number"]::-webkit-outer-spin-button,
.mk-delivery-popup__field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mk-delivery-popup__help {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 0.75rem;
  color: #6b7280 !important;
  line-height: 1.4;
}

/* ============================================
   Submit Button
   ============================================ */

.mk-delivery-popup__submit {
  width: 100%;
  padding: 14px 24px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.mk-delivery-popup__submit:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mk-delivery-popup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   Skip Link
   ============================================ */

.mk-delivery-popup__skip {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif !important;
  font-size: 0.8125rem;
  color: #6b7280 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.mk-delivery-popup__skip:hover {
  color: #1a1a1a !important;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 480px) {
  .mk-delivery-popup {
    padding: 24px 20px;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    transform: translateY(100%);
  }

  .mk-delivery-popup-overlay.active .mk-delivery-popup {
    transform: translateY(0);
  }

  .mk-delivery-popup-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ============================================
   Added to Cart Notice (toast on product page)
   ============================================ */

.mk-added-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #000000;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  z-index: 999999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.mk-added-notice.visible {
  opacity: 1;
  transform: translateY(0);
}
