/* Server Headers Check Styles */

/* Headers results container */
.headers-results-container {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Security rating display */
.headers-summary {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.security-rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.rating-a, .rating-a-plus {
    background: linear-gradient(135deg, #00cc66, #009933);
}

.rating-b {
    background: linear-gradient(135deg, #99cc00, #7aa700);
}

.rating-c {
    background: linear-gradient(135deg, #ffcc00, #e0b400);
}

.rating-d {
    background: linear-gradient(135deg, #ff9933, #e07000);
}

.rating-f {
    background: linear-gradient(135deg, #ff3333, #cc0000);
}

.rating-value {
    font-size: 36px;
    line-height: 1;
}

.rating-label {
    font-size: 12px;
    margin-top: 5px;
}

.summary-details {
    flex: 1;
}

/* Security score gauge */
.security-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.score-gauge {
    position: relative;
    width: 150px;
    height: 75px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-value {
    position: absolute;
    bottom: 0;
    font-size: 24px;
    font-weight: bold;
}

.score-label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
}

/* Tabs for different header types */
.headers-details-tabs {
    margin-top: 20px;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

.tab-btn.active {
    border-bottom-color: #0077cc;
    color: #0077cc;
}

.tab-content {
    padding: 20px 0;
}

/* Headers table styles */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.headers-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #eee;
}

.headers-table th {
    background-color: #f5f5f5;
    padding: 10px 15px;
    text-align: left;
    font-weight: bold;
}

.headers-table td {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    word-break: break-word;
}

.headers-table tr:nth-child(even) {
    background-color: #fafafa;
}

.headers-table tr.status-line {
    background-color: #e7f5ff;
    font-weight: bold;
}

.security-header-present td {
    background-color: #e6ffe6;
}

/* Security issues and recommendations */
.headers-section {
    margin-bottom: 30px;
}

.headers-section h3 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.recommendation-list {
    padding-left: 20px;
    margin-top: 10px;
}

.recommendation-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Security issue indicators */
.security-issue {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.issue-high {
    background-color: #ffeeee;
    color: #cc0000;
    border-left: 3px solid #cc0000;
}

.issue-medium {
    background-color: #fff0e6;
    color: #e07000;
    border-left: 3px solid #e07000;
}

.issue-low {
    background-color: #eef6ff;
    color: #0077cc;
    border-left: 3px solid #0077cc;
}

/* Security headers visualization */
.security-headers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.security-header-card {
    padding: 15px;
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.security-header-card.missing {
    border-left: 5px solid #ff3333;
}

.security-header-card.present {
    border-left: 5px solid #00cc66;
}

.security-header-name {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.security-header-name:before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.security-header-card.missing .security-header-name:before {
    background-color: #ff3333;
}

.security-header-card.present .security-header-name:before {
    background-color: #00cc66;
}

.security-header-description {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.security-header-value {
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
    word-break: break-all;
}

.security-header-recommendation {
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
    color: #555;
}

/* Form styles - to be standardized with global-styles.css */
/* .form-container {} */
/* .form-group {} */
/* .input-group {} */

.input-group input[type="url"].form-control {
    /* Specific overrides for being part of an input group */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    /* flex: 1; /* Assuming .input-group handles flex distribution */
    /* Base styles (padding, border, font-size, height) from .form-control */
}

.input-group button.btn {
    /* Specific overrides for being part of an input group */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    /* Base styles (padding, colors, border, font-weight, height) from .btn and .btn-primary etc. */
}

/* Ensure the button and input align height within an input-group */
.input-group .form-control,
.input-group .btn {
    padding-top: calc(var(--spacing-sm) + var(--spacing-xs)); /* Match .btn vertical padding */
    padding-bottom: calc(var(--spacing-sm) + var(--spacing-xs)); /* Match .btn vertical padding */
    line-height: var(--line-height-normal); /* Consistent line height */
    /* min-height will be dictated by global .form-control and this padding for inputs */
    /* For buttons, this padding will define their height */
}

/* .form-options {} */
/* .form-check {} */
/* .form-check input[type="checkbox"] {} */

/* Loading indicator */
.loading-container {
    text-align: center;
    padding: 20px;
}

.progress-bar {
    height: 4px;
    background-color: #f0f0f0;
    margin-top: 10px;
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #0077cc;
    border-radius: 2px;
    animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Information disclosure warnings */
.info-disclosure-section {
    margin: 20px 0;
}

.info-disclosure-item {
    background-color: #fff0e6;
    border-left: 5px solid #e07000;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.info-disclosure-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-disclosure-value {
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 5px;
    border-radius: 4px;
    margin-top: 5px;
    word-break: break-all;
}

.info-disclosure-concern {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
}

/* CORS concerns section */
.cors-concerns-section {
    margin: 20px 0;
}

.cors-concern-item {
    background-color: #ffeeee;
    border-left: 5px solid #cc0000;
    padding: 10px 15px;
    margin-bottom: 10px;
}

/* Caching headers section */
.cache-headers-section {
    margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .headers-summary {
        flex-direction: column;
    }
    
    .security-rating-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 0 auto;
        text-align: center;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .security-headers-grid {
        grid-template-columns: 1fr;
    }
}

.headers-tool-container {
    background-color: var(--secondary-a-color);
    border-radius: var(--border-radius-standard);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.url-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.url-input-group {
    flex: 1;
    min-width: 250px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    margin-top: var(--spacing-sm);
}

.option-checkbox input {
    margin-right: var(--spacing-xs);
}

.headers-result {
    margin-top: var(--spacing-xl);
}

.security-score {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-standard);
    background-color: var(--secondary-a-color);
}

.score-label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
}

.score-value {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
}

.score-bar {
    height: 10px;
    background-color: var(--current-border-color);
    border-radius: 5px;
    margin: var(--spacing-sm) 0;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.score-excellent {
    background-color: #28a745;  /* Green */
}

.score-good {
    background-color: #17a2b8;  /* Teal */
}

.score-fair {
    background-color: #ffc107;  /* Yellow */
}

.score-poor {
    background-color: #dc3545;  /* Red */
}

.score-description {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.headers-tabs {
    display: flex;
    border-bottom: 1px solid var(--current-border-color);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
}

.headers-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.headers-tab.active {
    border-bottom-color: var(--primary-accent);
    font-weight: var(--font-weight-semibold);
}

.header-panel {
    display: none;
}

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

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

.header-item {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--secondary-a-color);
    border-radius: var(--border-radius-standard);
}

.header-item.security {
    border-left: 4px solid #28a745;
}

.header-item.missing {
    border-left: 4px solid #dc3545;
}

.header-item.info {
    border-left: 4px solid #17a2b8;
}

.header-item.warning {
    border-left: 4px solid #ffc107;
}

.header-name {
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
    font-family: monospace;
}

.header-value {
    font-family: monospace;
    background-color: var(--secondary-b-color);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-small);
    white-space: pre-wrap;
    word-break: break-all;
}

.header-description {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.header-recommendation {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
    background-color: var(--secondary-b-color);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--primary-accent);
}

.raw-headers {
    font-family: monospace;
    background-color: var(--secondary-b-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-standard);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 500px;
    overflow-y: auto;
}

.tool-explanation {
    margin-top: var(--spacing-xl);
}

.recommended-headers {
    margin-top: var(--spacing-lg);
}

.header-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

.header-table th, 
.header-table td {
    padding: var(--spacing-sm);
    border: 1px solid var(--current-border-color);
    text-align: left;
}

.header-table th {
    background-color: var(--secondary-b-color);
}

.header-table code {
    background-color: var(--secondary-a-color);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

@media (max-width: 768px) {
    .url-form {
        flex-direction: column;
    }
    
    .url-input-group {
        width: 100%;
    }
    
    .headers-tabs {
        flex-wrap: wrap;
    }
} 