/* Security Headers spezifische Styles */

.score-display {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
    margin: 0;
}

.score-grade {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.score-grade.a-plus,
.score-grade.a {
    color: #10b981;
}

.score-grade.b {
    color: #3b82f6;
}

.score-grade.c {
    color: #f59e0b;
}

.score-grade.d,
.score-grade.e,
.score-grade.f {
    color: #ef4444;
}

.score-label {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.headers-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.header-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e5e7eb;
}

.header-card.pass {
    border-left-color: #10b981;
}

.header-card.warning {
    border-left-color: #f59e0b;
}

.header-card.fail {
    border-left-color: #ef4444;
}

.header-card.info {
    border-left-color: #3b82f6;
}

.header-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.header-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pass {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.fail {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.header-message {
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.header-value {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    color: #374151;
    margin: 0.75rem 0;
    word-break: break-all;
}

.header-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.75rem 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.detail-icon {
    font-size: 1.2rem;
}

.detail-label {
    color: #6b7280;
}

.detail-value {
    font-weight: 600;
    color: #111827;
}

.recommendation {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
}

.recommendation strong {
    color: #1e40af;
    display: block;
    margin-bottom: 0.25rem;
}

.recommendation-text {
    color: #1e3a8a;
    font-size: 0.9rem;
    line-height: 1.5;
}

.score-breakdown {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.score-breakdown h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #111827;
}

.score-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    background: #f9fafb;
}

.score-item-name {
    color: #374151;
    font-size: 0.9rem;
}

.score-item-value {
    font-weight: 600;
    color: #111827;
}

/* Security Profile */
.security-profile {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-emoji {
    font-size: 4rem;
    line-height: 1;
}

.profile-info {
    flex: 1;
}

.profile-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.profile-description {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
}

.profile-section {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.profile-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.profile-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.profile-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.profile-section.critical-issues {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
}

.profile-section.critical-issues h4 {
    color: #991b1b;
}

.profile-section.warnings {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.profile-section.warnings h4 {
    color: #92400e;
}

.profile-section.strengths {
    background: #d1fae5;
    border-left: 4px solid #10b981;
}

.profile-section.strengths h4 {
    color: #065f46;
}

/* Recommendations Section */
.recommendations-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recommendations-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #111827;
}

.recommendation-group {
    margin-bottom: 2rem;
}

.recommendation-group:last-child {
    margin-bottom: 0;
}

.recommendation-group h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.recommendation-group.critical h4 {
    color: #dc2626;
}

.recommendation-group.high h4 {
    color: #ea580c;
}

.recommendation-group.medium h4 {
    color: #f59e0b;
}

.recommendation-group.low h4 {
    color: #10b981;
}

.recommendation-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #e5e7eb;
}

.recommendation-group.critical .recommendation-item {
    border-left-color: #dc2626;
}

.recommendation-group.high .recommendation-item {
    border-left-color: #ea580c;
}

.recommendation-group.medium .recommendation-item {
    border-left-color: #f59e0b;
}

.recommendation-group.low .recommendation-item {
    border-left-color: #10b981;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rec-header-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
}

.rec-category {
    background: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.rec-issue,
.rec-impact,
.rec-fix {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.rec-issue strong,
.rec-impact strong,
.rec-fix strong {
    color: #374151;
}

.rec-template {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.template-code {
    display: block;
    background: #1f2937;
    color: #10b981;
    padding: 0.75rem;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    word-break: break-all;
    white-space: pre-wrap;
}

.copy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #2563eb;
}

/* Implementation Details */
.rec-implementation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.rec-implementation summary {
    cursor: pointer;
    font-weight: 600;
    color: #3b82f6;
    padding: 0.5rem 0;
}

.rec-implementation summary:hover {
    color: #2563eb;
}

.impl-content {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.impl-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 6px;
    flex-wrap: wrap;
}

.impl-platform {
    font-weight: 600;
    color: #374151;
    min-width: 120px;
    flex-shrink: 0;
}

.impl-code {
    flex: 1;
    background: #1f2937;
    color: #10b981;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    word-break: break-all;
    white-space: pre-wrap;
    min-width: 200px;
}

.impl-text {
    flex: 1;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.copy-btn-small {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.copy-btn-small:hover {
    background: #4b5563;
}

@media (max-width: 768px) {
    .impl-item {
        flex-direction: column;
        align-items: stretch;
    }

    .impl-platform {
        min-width: auto;
    }

    .impl-code {
        min-width: auto;
        width: 100%;
    }
}

/* Templates Section */
.templates-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.templates-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #111827;
}

.templates-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.templates-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.template-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.template-tab:hover {
    color: #3b82f6;
}

.template-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.templates-content {
    position: relative;
}

.template-panel {
    display: none;
}

.template-panel.active {
    display: block;
}

.template-panel pre {
    background: #1f2937;
    color: #10b981;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 1rem 0;
}

.template-panel code {
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.copy-btn-large {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
    width: 100%;
}

.copy-btn-large:hover {
    background: #2563eb;
}

/* Cookie Details */
.cookie-summary {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-details summary {
    font-weight: 600;
    color: #3b82f6;
}

.cookies-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.cookie-name {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.cookie-attrs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.cookie-attr {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.cookie-attr.yes {
    background: #d1fae5;
    color: #065f46;
}

.cookie-attr.no {
    background: #fee2e2;
    color: #991b1b;
}

.cookie-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .score-number {
        font-size: 3rem;
    }

    .score-grade {
        font-size: 2rem;
    }

    .header-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .score-items {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-title {
        font-size: 1.5rem;
    }

    .rec-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .templates-tabs {
        flex-wrap: wrap;
    }

    .template-tab {
        flex: 1;
        min-width: 100px;
    }
}

/* HSTS Preload & security.txt */
.extra-check-section {
    margin-top: 2rem;
}

.extra-check-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-fg, #080503);
}

.extra-check-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border, #dad7d0);
    background: var(--color-bg, #fafaf9);
}

.extra-check-item.status-pass    { border-color: #22c55e; background: #f0fdf4; }
.extra-check-item.status-warning { border-color: #f59e0b; background: #fffbeb; }
.extra-check-item.status-fail    { border-color: #ef4444; background: #fef2f2; }

.extra-check-icon {
    font-size: 1.25rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.extra-check-item p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--color-muted, #5e534a);
}

.extra-check-item code {
    background: rgba(0,0,0,.07);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.securitytxt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

.securitytxt-table td {
    padding: 3px 6px;
    border-bottom: 1px solid rgba(0,0,0,.07);
    word-break: break-all;
}

.securitytxt-table td:first-child {
    color: var(--color-muted, #5e534a);
    font-weight: 500;
    white-space: nowrap;
    width: 140px;
}
}
