.insureship-widget-container {
  margin: 20px 0;
  width: 100%;
  max-width: 100%;
  clear: both;
}

.insureship-widget-box {
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  padding: 16px;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
  max-width: 100%;
}

.insureship-widget-title {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 5px 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.25rem;
  color: #000000;
}

.insureship-widget-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.insureship-widget-title-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.insureship-widget-price-display {
  padding-left: 5px;
  font-size: 12.5px;
  color: #007bff;
  font-weight: 600;
}

.insureship-widget-desc {
  color: #333333;
  margin: 0 0 15px 30px;
  margin-right: 30px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5rem;
  text-align: left;
}

.insureship-info-icon {
  cursor: pointer;
  width: 18px;
  height: 18px;
  color: #666;
  margin-left: auto;
  flex-shrink: 0;
}

.insureship-info-icon:hover {
  color: #333;
}

.woocommerce-cart .insureship-widget-box,
.woocommerce-checkout .insureship-widget-box {
  background: #fff;
  border-color: #e0e0e0;
  max-width: 100%;
}

@media (max-width: 768px) {
  .insureship-widget-box {
    padding: 12px;
  }

  .insureship-widget-title {
    font-size: 11.5px;
  }

  .insureship-widget-desc {
    margin-left: 25px;
    margin-right: 15px;
    font-size: 9px;
  }

  .insureship-widget-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }
}

.wp-block-woocommerce-cart-order-summary-block + .insureship-widget-container,
.cart_totals + .insureship-widget-container {
  margin-top: 30px;
  margin-bottom: 20px;
  display: block !important;
}

.wp-block-woocommerce-checkout-order-summary-block
  + .insureship-widget-container,
#order_review + .insureship-widget-container {
  margin-top: 30px;
  margin-bottom: 20px;
}

.insureship-widget-box {
  background: transparent !important;
  border: none !important;
  padding: 5px 0 !important;
  margin: 0 !important;
  max-width: 100%;
}

.insureship-widget-container {
  margin: 10px 0 20px 0;
  width: 100%;
}

.insureship-widget-title {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 2px 0;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: #000000;
  text-align: right;
  flex-wrap: wrap;
}

.insureship-widget-checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  order: -1;
}

.insureship-widget-title-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.insureship-widget-icon {
  width: 15px;
  height: 17px;
  display: inline-block;
  background-image: url("../images/insureship-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  margin-right: 2px;
}

.insureship-widget-price-display {
  font-weight: 700;
  color: #007bff;
  margin-left: 2px;
}

.insureship-info-icon {
  width: 16px;
  height: 16px;
  color: #666;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 2px;
  transition: color 0.2s;
}

.insureship-info-icon:hover {
  color: #007bff;
}

.insureship-widget-desc {
  font-family: "Karla", sans-serif;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: #666666;
  text-align: right;
  margin: 0 0 0 26px;
  padding-right: 0;
  max-width: 100%;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .insureship-widget-title {
    font-size: 13px;
    gap: 4px;
  }

  .insureship-widget-desc {
    font-size: 12px;
    line-height: 18px;
    margin-left: 24px;
  }

  .insureship-widget-icon {
    width: 14px;
    height: 16px;
  }

  .insureship-widget-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }

  .insureship-info-icon {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 480px) {
  .insureship-widget-title {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .insureship-widget-desc {
    text-align: left;
    margin-left: 0;
  }
}

.insureship-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  animation: fadeIn 0.2s ease;
}

.insureship-modal-overlay.active {
  display: flex;
}

.insureship-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.insureship-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  z-index: 10;
}

.insureship-modal-close:hover {
  background: #f0f0f0;
  color: #000;
}

.insureship-modal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.insureship-modal-logo {
  width: 20px;
  height: 22px;
  display: inline-block;
  background-image: url("../images/insureship-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.insureship-powered-by {
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.5px;
}

.insureship-modal-header h2 {
  font-family: "Karla", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #000;
}

.insureship-modal-header p {
  font-family: "Karla", sans-serif;
  font-size: 16px;
  color: #666;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.insureship-benefits {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.insureship-benefit-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.insureship-benefit-check {
  font-size: 16px;
  color: #000000;
  font-weight: 400;
  line-height: 1.5;
  flex-shrink: 0;
  width: 20px;
  text-align: left;
}

.insureship-benefit-text {
  flex: 1;
}

.insureship-benefit-text strong {
  font-family: "Karla", sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: inline;
  margin-bottom: 0;
  color: #000;
}

.insureship-benefit-text p {
  font-family: "Karla", sans-serif;
  font-size: 16px;
  color: #424242;
  margin: 4px 0 0 0;
  line-height: 1.5;
}

.insureship-modal-description {
  background-color: #f8f9fa;
  padding: 5px;
  border-radius: 8px;
  margin-bottom: 30px;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.insureship-modal-description p {
  margin: 0;
  padding: 0;
}

.insureship-modal-footer {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid #eaeaea;
}

.insureship-modal-footer a {
  font-family: "Karla", sans-serif;
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.insureship-modal-footer a:hover {
  color: #0056b3;
  text-decoration: underline;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .insureship-modal-content {
    padding: 24px;
  }

  .insureship-modal-header h2 {
    font-size: 24px;
  }

  .insureship-benefit-text strong {
    font-size: 15px;
  }

  .insureship-benefit-text p {
    font-size: 13px;
  }

  .insureship-modal-footer {
    flex-wrap: wrap;
    gap: 16px;
  }
}

.insureship-mini-cart-container {
  width: 100%;
  margin-bottom: 15px;
}

.insureship-mini-cart-box {
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 0;
  background: #f9f9f9;
  border-radius: 4px;
}

.insureship-mini-cart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 0 12px;
}

.wc-block-mini-cart__footer {
  margin-top: 10px;
}

.insureship-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

.insureship-modal-overlay.active {
  display: flex;
}

.insureship-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
}

.insureship-modal h2 {
  font-family: "Karla", sans-serif;
  font-size: 24px;
  margin-bottom: 16px;
}

.insureship-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.insureship-modal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.insureship-modal-logo {
  width: 20px;
  height: 22px;
  background-image: url("../images/insureship-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
}

.insureship-powered-by {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.5px;
}

.insureship-benefits {
  margin: 24px 0;
}

.insureship-benefit-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.insureship-benefit-check {
  color: #000;
  font-size: 16px;
}

.insureship-benefit-text strong {
  display: block;
  margin-bottom: 4px;
}

.insureship-modal-description {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin: 24px 0;
  font-size: 14px;
  color: #444;
}

.insureship-modal-footer {
  display: flex;
  gap: 24px;
  justify-content: center;
  border-top: 1px solid #eaeaea;
  padding-top: 24px;
}

.insureship-modal-footer a {
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
}

@keyframes insureship-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.insureship-skeleton-box {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.insureship-skeleton-line {
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: insureship-shimmer 1.4s infinite linear;
}

.insureship-skeleton-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
}

.insureship-skeleton-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
}

.insureship-skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insureship-skeleton-title {
  width: 55%;
  height: 14px;
}

.insureship-skeleton-desc {
  width: 80%;
  height: 11px;
}

.insureship-skeleton-price {
  width: 48px;
  height: 16px;
  border-radius: 4px;
  margin-left: auto;
  min-width: 48px;
}

.insureship-widget-box.insureship-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.insureship-widget-box.insureship-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 75%
  );
  background-size: 400px 100%;
  animation: insureship-shimmer 1.2s infinite linear;
}

.insureship-widget-checkbox.insureship-spinner {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-top-color: #6b7280;
  border-radius: 50%;
  animation: insureship-spin 0.7s linear infinite;
  pointer-events: none;
  flex-shrink: 0;
}

@keyframes insureship-spin {
  to {
    transform: rotate(360deg);
  }
}

.insureship-widget-box--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.insureship-widget-box--disabled .insureship-widget-checkbox {
  cursor: not-allowed;
}

.insureship-widget-price--unavailable {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.insureship-widget-desc--disabled {
  color: #999;
  font-style: italic;
}
