/* SPF/DMARC/TXT Tools Common Styles */
.spf-checker-tool-page,
.dmarc-checker-tool-page,
.txt-lookup-tool-page {
  padding-top: 6rem;
  min-height: 100vh;
  background-color: var(--color-dark);
  color: var(--color-white);
}

.tool-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-white-5);
  background: linear-gradient(135deg, var(--color-gray) 0%, var(--color-darker) 100%);
}

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-white-60);
}

.tool-breadcrumb-link {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.tool-breadcrumb-link:hover {
  color: var(--color-white);
}

.tool-breadcrumb-separator {
  color: var(--color-white-40);
}

.tool-breadcrumb-current {
  color: var(--color-white);
}

.tool-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.tool-subtitle {
  font-size: 1.125rem;
  color: var(--color-white-60);
  max-width: 700px;
  line-height: 1.6;
}

.tool-content {
  padding: 3rem 0;
}

.tool-form-section {
  margin-bottom: 2rem;
}

.tool-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--border-radius);
  color: #fca5a5;
  margin-bottom: 2rem;
}

.tool-error svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tool-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.tool-loading.hidden {
  display: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-white-10);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tool-loading p {
  color: var(--color-white-60);
  font-size: 1rem;
}

.tool-info-section {
  margin-top: 4rem;
  padding: 2rem;
  background-color: var(--color-gray);
  border: 1px solid var(--color-white-5);
  border-radius: var(--border-radius);
}

.tool-info-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.tool-info-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.tool-info-section p {
  color: var(--color-white-60);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tool-info-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--color-white-60);
  line-height: 1.8;
}

.tool-info-list li {
  margin-bottom: 0.5rem;
}

/* Form Styles */
.spf-checker-form,
.dmarc-checker-form,
.txt-lookup-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.form-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.form-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background-color: var(--color-gray);
  border: 1px solid var(--color-white-10);
  border-radius: var(--border-radius);
  color: var(--color-white);
  font-size: 1rem;
  transition: all var(--transition-speed);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(13, 103, 254, 0.1);
}

.form-input::placeholder {
  color: var(--color-white-40);
}

.form-submit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-blue));
  border: none;
  border-radius: var(--border-radius);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 103, 254, 0.3);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-submit-btn svg {
  width: 20px;
  height: 20px;
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-white-60);
  line-height: 1.6;
}

/* Result Cards */
.spf-checker-result-card,
.dmarc-checker-result-card,
.txt-lookup-result-card {
  background-color: var(--color-gray);
  border: 1px solid var(--color-white-5);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.spf-checker-result-title,
.dmarc-checker-result-title,
.txt-lookup-result-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-white);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-white-5);
}

.spf-checker-result-title svg,
.dmarc-checker-result-title svg,
.txt-lookup-result-title svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* SPF Specific Styles */
.spf-status {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.spf-status-error {
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.spf-status-warning {
  background-color: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.spf-status ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.spf-record-raw {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--color-darker);
  border-radius: calc(var(--border-radius) / 1.5);
}

.spf-record-raw strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.spf-record-raw code {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--color-white);
  word-break: break-all;
}

.spf-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.spf-mechanisms-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spf-mechanism-item {
  padding: 1rem;
  background-color: var(--color-darker);
  border: 1px solid var(--color-white-5);
  border-radius: calc(var(--border-radius) / 1.5);
}

.spf-mechanism-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.spf-qualifier-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: monospace;
}

.spf-qualifier-pass {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.spf-qualifier-fail {
  background-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.spf-qualifier-softfail {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.spf-qualifier-neutral {
  background-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.spf-mechanism-type {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
}

.spf-mechanism-value {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background-color: var(--color-gray);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-white);
}

.spf-mechanism-description {
  font-size: 0.875rem;
  color: var(--color-white-60);
}

/* DMARC Specific Styles */
.dmarc-domain-info {
  margin-bottom: 1rem;
  color: var(--color-white-60);
}

.dmarc-domain-info code {
  font-family: 'Courier New', monospace;
  background-color: var(--color-darker);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-accent);
}

.dmarc-status {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.dmarc-status-error {
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.dmarc-status-warning {
  background-color: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.dmarc-status ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.dmarc-record-raw {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--color-darker);
  border-radius: calc(var(--border-radius) / 1.5);
}

.dmarc-record-raw strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.dmarc-record-raw code {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--color-white);
  word-break: break-all;
}

.dmarc-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.dmarc-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.dmarc-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dmarc-info-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white-60);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dmarc-info-value {
  font-size: 1rem;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dmarc-policy-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.dmarc-policy-none {
  background-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.dmarc-policy-quarantine {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.dmarc-policy-reject {
  background-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.dmarc-info-desc {
  font-size: 0.875rem;
  color: var(--color-white-60);
}

.dmarc-info-value code {
  font-family: 'Courier New', monospace;
  background-color: var(--color-darker);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-white);
}

.dmarc-report-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--color-darker);
  border-radius: calc(var(--border-radius) / 1.5);
}

.dmarc-report-item strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--color-white);
}

.dmarc-report-item ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
  color: var(--color-white-60);
}

.dmarc-report-item code {
  font-family: 'Courier New', monospace;
  background-color: var(--color-gray);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-white);
}

/* TXT Lookup Specific Styles */
.txt-records-count {
  font-size: 1rem;
  color: var(--color-white-60);
  margin-top: 0.5rem;
}

.txt-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.txt-records-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.txt-record-item {
  padding: 1.5rem;
  background-color: var(--color-darker);
  border: 1px solid var(--color-white-5);
  border-radius: calc(var(--border-radius) / 1.5);
}

.txt-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.txt-record-type-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 700;
}

.txt-record-type-spf {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.txt-record-type-dkim {
  background-color: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.txt-record-type-dmarc {
  background-color: rgba(236, 72, 153, 0.2);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.txt-record-type-google_verification {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.txt-record-type-facebook_verification {
  background-color: rgba(37, 99, 235, 0.2);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.txt-record-type-other {
  background-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.txt-record-ttl {
  font-size: 0.875rem;
  color: var(--color-white-60);
}

.txt-record-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.txt-record-value {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background-color: var(--color-gray);
  padding: 1rem;
  border-radius: 4px;
  color: var(--color-white);
  word-break: break-all;
  white-space: pre-wrap;
}

.txt-record-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-gray);
  border: 1px solid var(--color-white-5);
  border-radius: calc(var(--border-radius) / 1.5);
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-speed);
  width: fit-content;
}

.txt-record-action:hover {
  background-color: var(--color-darker);
  border-color: var(--color-accent);
}

.txt-records-list ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.txt-records-list code {
  font-family: 'Courier New', monospace;
  background-color: var(--color-darker);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-white);
  word-break: break-all;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tool-title {
    font-size: 2rem;
  }

  .tool-subtitle {
    font-size: 1rem;
  }

  .form-input-wrapper {
    flex-direction: column;
  }

  .form-submit-btn {
    width: 100%;
    justify-content: center;
  }

  .spf-checker-result-card,
  .dmarc-checker-result-card,
  .txt-lookup-result-card {
    padding: 1.5rem;
  }

  .dmarc-info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .txt-record-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Light theme support */
[data-theme='light'] .spf-checker-tool-page,
[data-theme='light'] .dmarc-checker-tool-page,
[data-theme='light'] .txt-lookup-tool-page {
  background-color: var(--color-dark);
}

[data-theme='light'] .spf-checker-result-card,
[data-theme='light'] .dmarc-checker-result-card,
[data-theme='light'] .txt-lookup-result-card,
[data-theme='light'] .tool-info-section {
  background-color: var(--color-gray);
  border-color: var(--color-gray-light);
}

