/* assets/css/frontend-style.css */

.dc-checker-wrapper {
  --dc-primary-color: #4caf50;
  --dc-primary-hover: #45a049;
  --dc-success-bg: #d4edda;
  --dc-success-color: #155724;
  --dc-error-bg: #f8d7da;
  --dc-error-color: #721c24;
  --dc-border-radius: 8px;

  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  max-width: 500px;
  margin: 0 auto;
}

/* Default Style */
.dc-style-default {
  background: #f8f9fa;
  padding: 25px;
  border-radius: var(--dc-border-radius);
  border: 1px solid #e9ecef;
}

/* Card Style */
.dc-style-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Minimal Style */
.dc-style-minimal {
  padding: 15px 0;
}

.dc-checker-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* Form */
.dc-checker-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dc-input-group {
  display: flex;
  gap: 10px;
}

.dc-zip-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: var(--dc-border-radius);
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.dc-zip-input:focus {
  border-color: var(--dc-primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.dc-zip-input::placeholder {
  color: #999;
}

.dc-check-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--dc-primary-color);
  border: none;
  border-radius: var(--dc-border-radius);
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-check-btn:hover {
  background: var(--dc-primary-hover);
  transform: translateY(-1px);
}

.dc-check-btn:active {
  transform: translateY(0);
}

.dc-check-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.dc-btn-loader svg {
  animation: dc-spin 1s linear infinite;
}

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

/* Geolocation Button */
.dc-geo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: #666;
  background: transparent;
  border: 1px dashed #ccc;
  border-radius: var(--dc-border-radius);
  cursor: pointer;
  transition: all 0.3s;
}

.dc-geo-btn:hover {
  color: var(--dc-primary-color);
  border-color: var(--dc-primary-color);
  background: rgba(76, 175, 80, 0.05);
}

.dc-geo-btn svg {
  flex-shrink: 0;
}

/* Result */
.dc-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--dc-border-radius);
  animation: dc-fadeIn 0.3s ease;
}

@keyframes dc-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dc-result.dc-success {
  background: var(--dc-success-bg);
  border: 1px solid #c3e6cb;
}

.dc-result.dc-error {
  background: var(--dc-error-bg);
  border: 1px solid #f5c6cb;
}

.dc-result-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dc-result-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.dc-result.dc-success .dc-result-icon {
  color: var(--dc-success-color);
}

.dc-result.dc-error .dc-result-icon {
  color: var(--dc-error-color);
}

.dc-result-text {
  flex: 1;
}

.dc-result-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.dc-result.dc-success .dc-result-message {
  color: var(--dc-success-color);
}

.dc-result.dc-error .dc-result-message {
  color: var(--dc-error-color);
}

.dc-result-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.dc-result-detail {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dc-result-detail-label {
  color: #666;
}

.dc-result-detail-value {
  font-weight: 600;
}

/* Close Button */
.dc-close-result {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.dc-close-result:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
  .dc-input-group {
    flex-direction: column;
  }

  .dc-check-btn {
    width: 100%;
    justify-content: center;
  }
}
