/* ===== POPUP STYLES ===== */
.wc-pincode-pro-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wc-pincode-pro-popup .popup-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.wc-pincode-pro-popup .popup-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.popup-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 20px 20px 0 0;
  position: relative;
  text-align: center;
}

.popup-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.popup-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.popup-body {
  padding: 40px;
}

.popup-description {
  text-align: center;
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.pincode-input-section {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

#popup-pincode-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

#popup-pincode-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.check-pincode-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.check-pincode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.check-pincode-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pincode-result {
  margin-top: 15px;
}

.result-loading {
  background: #e3f2fd;
  color: #1976d2;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #1976d2;
}

.result-success {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #2e7d32;
}

.result-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid #c62828;
}

.products-count {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

.popup-features {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.feature {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #555;
}

.feature-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.feature-text {
  font-size: 14px;
}

.popup-footer {
  padding: 20px 40px;
  border-top: 1px solid #eee;
  text-align: center;
}

.skip-pincode-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

.skip-pincode-btn:hover {
  color: #333;
}

/* ===== PINCODE WIDGET ===== */
.wc-pincode-widget {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 99999;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #667eea;
  animation: widgetSlideIn 0.5s ease-out;
}

@keyframes widgetSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.widget-content {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 12px;
}

.widget-icon {
  font-size: 20px;
}

.widget-info {
  display: flex;
  flex-direction: column;
}

.pincode-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
}

.pincode-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.change-pincode-btn {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-pincode-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* ===== PRODUCT PINCODE DISPLAY ===== */
.wc-pincode-pro-display {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
}

.wc-pincode-pro-display h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

/* Badges Format */
.pincode-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.pincode-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.pincode-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Inline Format */
.pincode-inline-display {
  font-size: 15px;
  line-height: 1.6;
}

.pincode-inline-list {
  color: #555;
}

.pincode-more {
  color: #667eea;
  cursor: pointer;
  font-weight: 500;
}

/* List Format */
.pincode-list-display ul.pincode-columns {
  columns: 3;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pincode-list-display li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #555;
}

.pincode-show-more {
  margin-top: 15px;
}

.show-all-pincodes-list,
.show-all-pincodes-btn {
  background: none;
  border: 1px solid #667eea;
  color: #667eea;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.show-all-pincodes-list:hover,
.show-all-pincodes-btn:hover {
  background: #667eea;
  color: white;
}

/* Modal for all pincodes */
.all-pincodes-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.all-pincodes-modal .modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
}

.all-pincodes-modal h4 {
  margin: 0 0 20px 0;
  color: #333;
}

.close-modal {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
}

.pincode-summary {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
  color: #666;
  font-size: 13px;
}

/* ===== SHOP PAGE DISPLAY ===== */
.wc-pincode-pro-loop {
  margin: 8px 0;
  font-size: 13px;
}

.wc-pincode-pro-loop.available {
  border-left: 3px solid #4caf50;
  padding-left: 8px;
}

.wc-pincode-pro-loop.not-available {
  border-left: 3px solid #f44336;
  padding-left: 8px;
}

.pincode-status {
  font-weight: 600;
  margin-right: 8px;
}

.status-available {
  color: #4caf50;
}

.status-unavailable {
  color: #f44336;
}

.pincode-count {
  color: #666;
  margin-right: 8px;
}

.pincode-preview {
  margin-top: 4px;
}

.pincode-mini-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 6px;
  margin: 1px 2px;
  border-radius: 3px;
  font-size: 11px;
  border: 1px solid #bbdefb;
}

.pincode-more-count {
  color: #666;
  font-size: 11px;
  margin-left: 4px;
}

/* ===== PRODUCT PAGE CHECKER ===== */
.wc-pincode-product-checker {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.wc-pincode-product-checker h4 {
  margin: 0 0 15px 0;
  color: #333;
}

.pincode-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.pincode-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
}

.pincode-input:focus {
  outline: none;
  border-color: #667eea;
}

.current-pincode-status {
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-weight: 500;
}

.pincode-available {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.pincode-unavailable {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.change-pincode-link {
  background: none;
  border: none;
  color: #667eea;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 10px;
  font-size: 12px;
}

/* ===== TEMPLATE SPECIFIC STYLES ===== */

/* Popup Input Wrapper */
.input-wrapper {
  position: relative;
  flex: 1;
}

.input-wrapper .input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

.input-wrapper .pincode-input {
  padding-right: 45px;
  width: 100%;
}

/* Button Loading States */
.btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* Popup Features */
.popup-features .feature {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
}

.feature-content {
  display: flex;
  flex-direction: column;
}

.feature-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.feature-desc {
  color: #666;
  font-size: 12px;
}

.feature-icon {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

/* Widget Actions */
.widget-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.widget-action-btn {
  flex: 1;
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  color: #666;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.widget-action-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Pincode Display Header */
.pincode-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.current-pincode-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-pincode-mini {
  background: none;
  border: 1px solid #1976d2;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  cursor: pointer;
}

/* Current Pincode Indicator */
.pincode-badge.current-pincode {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  position: relative;
  padding-right: 30px;
}

.current-indicator {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  color: #4caf50;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.pincode-columns li.current-pincode {
  color: #4caf50;
  font-weight: 600;
}

/* Summary Stats */
.summary-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e1e5e9;
}

.stat-item.total {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.stat-number {
  font-size: 18px;
  font-weight: bold;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.8;
}

.availability-status {
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  margin-top: 10px;
}

.availability-status.available {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.availability-status.not-available {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* Checker Styles */
.checker-header {
  margin-bottom: 20px;
}

.checker-description {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

.status-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.pincode-display {
  opacity: 0.8;
  font-size: 0.9em;
}

.checker-features {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  justify-content: space-around;
}

.checker-features .feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.checker-features .feature-icon {
  font-size: 20px;
}

.checker-features .feature-text {
  font-size: 11px;
  color: #666;
}

/* Modal Styles */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.modal-header h4 {
  margin: 0;
  color: #333;
}

.modal-body {
  max-height: 400px;
  overflow-y: auto;
}

.modal-footer {
  margin-top: 20px;
  text-align: right;
}

/* Result Icons */
.result-icon {
  margin-right: 8px;
}

/* Responsive Design for Templates */
@media (max-width: 768px) {
  .pincode-display-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-stats {
    gap: 8px;
  }

  .stat-item {
    padding: 6px 8px;
  }

  .stat-number {
    font-size: 16px;
  }

  .checker-features {
    flex-direction: column;
    gap: 10px;
  }

  .checker-features .feature {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
  }

  .widget-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .popup-features .feature {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .feature-content {
    align-items: center;
  }
}

.pincode-not-available {
  display: block;
  color: #f44336;
  font-weight: 500;
  padding: 10px;
  background: #ffebee;
  border-radius: 4px;
  text-align: center;
  margin: 10px 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .wc-pincode-pro-popup .popup-container {
    width: 95%;
    margin: 20px;
  }

  .popup-body {
    padding: 30px 20px;
  }

  .pincode-input-section {
    flex-direction: column;
  }

  .wc-pincode-widget {
    top: 20px;
    right: 20px;
    left: 20px;
  }

  .widget-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .pincode-list-display ul.pincode-columns {
    columns: 2;
  }

  .pincode-badges-container {
    gap: 6px;
  }

  .pincode-badge {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .popup-header {
    padding: 20px;
  }

  .popup-header h3 {
    font-size: 20px;
  }

  .pincode-list-display ul.pincode-columns {
    columns: 1;
  }

  .all-pincodes-modal .modal-content {
    padding: 20px;
    margin: 10px;
  }
}
