/* Powerpac Postal Code Checker Styles */
.pppc-container {
  margin: 0 auto;
}

/* Override any theme styles */
#pppc-postal-code,
input#pppc-postal-code,
.pppc-checker input#pppc-postal-code {
  flex: 0 0 120px !important;
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  padding: 16px 12px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #2d3748 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  font-family: inherit !important;
  text-align: center !important;
  letter-spacing: 2px !important;
  box-sizing: border-box !important;
}

.pppc-checker {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 32px;
  border: 1px solid #e1e5e9;
}

.pppc-header {
  text-align: left;
  margin-bottom: 32px;
}

.pppc-title {
  color: #1a365d;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.pppc-description {
  color: #4a5568;
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}

.pppc-form {
  margin-bottom: 32px;
}

.pppc-input-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pppc-input {
  flex: 0 0 120px !important;
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  padding: 16px 12px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #2d3748 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  font-family: inherit !important;
  text-align: center !important;
  letter-spacing: 2px !important;
  box-sizing: border-box !important;
}

.pppc-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.pppc-input::placeholder {
  color: #a0aec0;
}

.pppc-button {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pppc-button:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.pppc-button:active {
  transform: translateY(0);
}

.pppc-button:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pppc-spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Result Styles */
.pppc-result {
  margin-top: 32px;
  padding: 24px;
  border-radius: 8px;
  animation: slideIn 0.4s ease-out;
}

.pppc-result.qualified {
  background: #ffffff;
  border-color: #e2e8f0;
}

.pppc-result.not-qualified {
  background: #ffffff;
  border-color: #e2e8f0;
}

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

.pppc-result-content {
  text-align: left;
}

.pppc-result-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: bold;
}

.pppc-result.qualified .pppc-result-icon {
  background: #48bb78;
  color: white;
}

.pppc-result.qualified .pppc-result-icon::before {
  content: "✓";
}

.pppc-result.not-qualified .pppc-result-icon {
  background: #f56565;
  color: white;
}

.pppc-result.not-qualified .pppc-result-icon::before {
  content: "!";
}

.pppc-result-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #2d3748;
}

.pppc-result-message {
  font-size: 18px;
  color: #4a5568;
  margin-bottom: 24px;
  line-height: 1.5;
}

.pppc-result-details {
  margin-bottom: 32px;
}

.pppc-result-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pppc-result-details li {
  padding: 8px 0;
  color: #2d3748;
  font-weight: 500;
  position: relative;
  padding-left: 24px;
}

.pppc-result-details li::before {
  content: "•";
  color: #dc2626;
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 20px;
}

.pppc-result-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.pppc-action-button {
  padding: 16px 32px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pppc-primary-button {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white !important;
  border-color: #dc2626;
}

.pppc-primary-button:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.pppc-secondary-button {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.pppc-secondary-button:hover {
  background: #b91c1c;
  color: white;
  transform: translateY(-1px);
}

.pppc-contact-info {
  background: #f7fafc;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.pppc-contact-info p {
  margin: 8px 0;
  color: #4a5568;
}

.pppc-contact-info a {
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}

.pppc-contact-info a:hover {
  text-decoration: underline;
}

.pppc-footer {
  margin-top: 32px;
  text-align: left;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.pppc-terms {
  color: #718096;
  font-size: 14px;
  line-height: 1.4;
}

.pppc-terms a {
  color: #dc2626;
  text-decoration: none;
}

.pppc-terms a:hover {
  text-decoration: underline;
}

/* Error States */
.pppc-input.error {
  border-color: #f56565;
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.pppc-error-message {
  color: #f56565;
  font-size: 14px;
  margin-top: 8px;
  display: none;
  font-weight: 500;
}

/* Delivery Times Section */
.pppc-delivery-times {
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.pppc-delivery-times h4 {
  margin: 0 0 12px 0;
  color: #2d3748;
  font-size: 16px;
  font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .pppc-container {
    padding: 0;
  }

  .pppc-checker {
    padding: 24px;
  }

  .pppc-title {
    font-size: 24px;
  }

  .pppc-input-group {
    flex-direction: column;
  }

  .pppc-input {
    min-width: auto;
  }

  .pppc-button {
    width: 100%;
  }

  .pppc-result-actions {
    flex-direction: column;
  }

  .pppc-action-button {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .pppc-title {
    font-size: 22px;
  }

  .pppc-description {
    font-size: 15px;
  }

  .pppc-input {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .pppc-button {
    padding: 14px 24px;
  }

  .pppc-action-button {
    padding: 14px 24px;
  }
}
