/* Finsbury Media Consent Audit Plugin Styles */

/* Form Styles */
.finsmeco-consent-audit-form {
  margin: 32px 0;
  padding: 24px 32px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(30, 42, 56, 0.07);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.finsmeco-consent-audit-form label {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a38;
  margin-bottom: 2px;
}

.finsmeco-consent-audit-form input[type='text'] {
  padding: 10px 14px;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.2s;
  background: #f7f8fa;
  box-sizing: border-box;
}

.finsmeco-consent-audit-form input[type='text']:focus {
  border-color: #00b67a;
  outline: none;
}

.finsmeco-consent-audit-form select {
  padding: 10px 14px;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.2s;
  background: #f7f8fa;
  box-sizing: border-box;
  cursor: pointer;
}

.finsmeco-consent-audit-form select:focus {
  border-color: #00b67a;
  outline: none;
}

.finsmeco-consent-audit-form button {
  padding: 12px 20px;
  background: #00b67a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  width: 100%;
  margin-top: 8px;
}

.finsmeco-consent-audit-form button:hover {
  background: #009960;
}

.finsmeco-consent-audit-form button:disabled,
.finsmeco-consent-audit-form button.disabled {
  background: #bdbdbd;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Loading State */
.loader-banner {
  width: 100%;
  height: 400px;
  background-color: #f7f8fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #e5e5e5;
  border-top: 6px solid #00b67a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loader-text {
  font-size: 20px;
  color: #1e2a38;
}

/* Result Container */
.finsmeco-consent-audit-result {
  margin-top: 32px;
}

#finsmeco-consent-audit-report {
  margin-bottom: 24px;
}

#finsmeco-consent-audit-error {
  font-size: 15px;
  color: #d32f2f;
  background: #fff0f0;
  border: 1px solid #f8d7da;
  border-radius: 6px;
  padding: 12px 18px;
  margin-bottom: 18px;
  font-weight: 500;
}

/* Report Template Styles */
.finsmeco-audit-report {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1e2a38;
  font-size: 15px;
  line-height: 1.7;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(30, 42, 56, 0.07);
  padding: 24px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .finsmeco-consent-audit-result {
    padding: 0 16px;
    max-width: 1200px;
  }

  .finsmeco-audit-report {
    padding: 32px 40px;
    max-width: 1200px;
  }
}

@media (min-width: 1200px) {
  .finsmeco-audit-report {
    max-width: 1400px;
  }
}

.finsmeco-report-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e5e5;
}

.finsmeco-report-header h2 {
  font-size: 1.5em;
  color: #1e2a38;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.finsmeco-page-title {
  color: #00b67a;
  font-weight: 700;
}

.finsmeco-auditor-type,
.finsmeco-audited-url {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
}

.finsmeco-auditor-type strong,
.finsmeco-audited-url strong {
  color: #1e2a38;
  margin-right: 8px;
  font-size: 14px;
  display: inline;
}

/* Status Summary Section */
.finsmeco-status-summary {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 32px;
  border-left: 5px solid;
}

.finsmeco-status-icon {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
}

.finsmeco-status-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.3em;
  font-weight: 700;
}

.finsmeco-status-content p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}

/* Success Status */
.finsmeco-status-success {
  background: #e8f5e9;
  border-left-color: #4caf50;
}

.finsmeco-status-success .finsmeco-status-icon {
  color: #4caf50;
}

.finsmeco-status-success .finsmeco-status-content h3 {
  color: #2e7d32;
}

.finsmeco-status-success .finsmeco-status-content p {
  color: #1b5e20;
}

/* Warning Status */
.finsmeco-status-warning {
  background: #fff8e1;
  border-left-color: #ff9800;
}

.finsmeco-status-warning .finsmeco-status-icon {
  color: #ff9800;
}

.finsmeco-status-warning .finsmeco-status-content h3 {
  color: #e65100;
}

.finsmeco-status-warning .finsmeco-status-content p {
  color: #e65100;
}

/* Error Status */
.finsmeco-status-error {
  background: #ffebee;
  border-left-color: #f44336;
}

.finsmeco-status-error .finsmeco-status-icon {
  color: #f44336;
}

.finsmeco-status-error .finsmeco-status-content h3 {
  color: #c62828;
}

.finsmeco-status-error .finsmeco-status-content p {
  color: #b71c1c;
}

@media (max-width: 767px) {
  .finsmeco-status-summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }

  .finsmeco-status-icon {
    font-size: 40px;
  }
}

.finsmeco-checks-section,
.finsmeco-evidence-section {
  margin-bottom: 32px;
}

.finsmeco-checks-section h3,
.finsmeco-evidence-section h3 {
  font-size: 1.2em;
  color: #1e2a38;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.finsmeco-checks-table,
.finsmeco-evidence-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.finsmeco-checks-table thead,
.finsmeco-evidence-table thead {
  background: #f7f8fa;
}

.finsmeco-checks-table th,
.finsmeco-evidence-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #1e2a38;
  border-bottom: 2px solid #e5e5e5;
}

.finsmeco-checks-table td,
.finsmeco-evidence-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}

.finsmeco-checks-table tr:hover,
.finsmeco-evidence-table tr:hover {
  background: #f9f9f9;
}

.finsmeco-check-pass {
  color: #00b67a;
  font-size: 20px;
  font-weight: bold;
}

.finsmeco-check-fail {
  color: #d32f2f;
  font-size: 20px;
  font-weight: bold;
}

.finsmeco-command-kind {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.finsmeco-kind-default {
  background: #e3f2fd;
  color: #1976d2;
}

.finsmeco-kind-update {
  background: #e8f5e9;
  color: #388e3c;
}

.finsmeco-kind-unknown {
  background: #f5f5f5;
  color: #757575;
}

.finsmeco-payload-cell {
  max-width: 300px;
}

.finsmeco-payload-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.finsmeco-payload-list li {
  margin: 4px 0;
  padding-left: 0;
  font-size: 13px;
}

.finsmeco-payload-list strong {
  color: #1e2a38;
  font-weight: 600;
  margin: 0;
  display: inline;
  font-size: 13px;
}

.finsmeco-payload-value {
  display: inline;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  margin-left: 4px;
}

.finsmeco-value-granted {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 600;
}

.finsmeco-value-denied {
  background: #ffebee;
  color: #c62828;
  font-weight: 600;
}

.finsmeco-no-evidence {
  color: #999;
  font-style: italic;
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
  border-radius: 6px;
}

.finsmeco-banner-info {
  margin-top: 24px;
  padding: 12px 16px;
  background: #f0f8ff;
  border-left: 4px solid #00b67a;
  border-radius: 4px;
}

.finsmeco-banner-info p {
  margin: 0;
  color: #1e2a38;
  font-size: 14px;
}

/* Report Actions */
.finsmeco-report-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e5e5e5;
  text-align: center;
}

.finsmeco-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #00b67a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 182, 122, 0.2);
}

.finsmeco-download-btn:hover {
  background: #009960;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 182, 122, 0.3);
}

.finsmeco-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 182, 122, 0.2);
}

.finsmeco-btn-icon {
  font-size: 18px;
  line-height: 1;
}

/* Print-specific styles for PDF */
@media print {
  .finsmeco-report-actions,
  .finsmeco-download-btn {
    display: none !important;
  }
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  /* Evidence table: stack cells vertically on mobile */
  .finsmeco-evidence-table {
    font-size: 13px;
  }

  .finsmeco-evidence-table thead {
    display: none;
  }

  .finsmeco-evidence-table tbody,
  .finsmeco-evidence-table tr,
  .finsmeco-evidence-table td {
    display: block;
    width: 100%;
  }

  .finsmeco-evidence-table tr {
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
  }

  .finsmeco-evidence-table td {
    padding: 8px 0;
    border-bottom: none;
    text-align: left;
  }

  .finsmeco-evidence-table td:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
  }

  .finsmeco-evidence-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #1e2a38;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .finsmeco-payload-cell {
    max-width: 100%;
  }

  .finsmeco-evidence-table tr:hover {
    background: #fff;
  }
}
