/* SSL Certificate Checker Styles */

/* Main container styling */
.ssl-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 */
.security-rating-container {
    display: inline-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-value {
    font-size: 36px;
    line-height: 1;
}

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

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

.rating-a {
    background: linear-gradient(135deg, #33cc33, #00a040);
}

.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);
}

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

.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;
}

/* Certificate chain visualization */
.cert-chain-container {
    margin: 30px 0;
    position: relative;
}

.cert-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-chain-item {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.cert-chain-item:not(:last-child):after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background-color: #ccc;
}

.cert-chain-item:not(:last-child):before {
    content: "🔒";
    position: absolute;
    bottom: -25px;
    left: calc(50% - 10px);
    font-size: 20px;
    z-index: 2;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px white;
}

.cert-info-row {
    display: flex;
    margin-bottom: 5px;
}

.cert-info-label {
    flex: 0 0 30%;
    font-weight: bold;
    color: #555;
}

.cert-info-value {
    flex: 0 0 70%;
}

.cert-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.cert-item-title {
    font-weight: bold;
    font-size: 16px;
}

.cert-item-type {
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    background-color: #e7f5ff;
    color: #0077cc;
}

/* Security issues list */
.security-issues {
    margin: 20px 0;
}

.issue-item {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-left: 5px solid #ccc;
    background-color: #f5f5f5;
    font-size: 14px;
}

.issue-item.critical {
    border-left-color: #ff3333;
    background-color: #ffeeee;
}

.issue-item.warning {
    border-left-color: #ffcc00;
    background-color: #fffaee;
}

.issue-item.info {
    border-left-color: #33aaff;
    background-color: #eef6ff;
}

/* Recommendations section */
.recommendations {
    margin: 20px 0;
}

.recommendation-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.recommendation-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.recommendation-priority {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-critical {
    background-color: #ffeeee;
    color: #cc0000;
}

.priority-high {
    background-color: #fff0e6;
    color: #e07000;
}

.priority-medium {
    background-color: #fffaee;
    color: #b8a000;
}

.priority-low {
    background-color: #eef6ff;
    color: #0077cc;
}

.recommendation-title {
    font-weight: bold;
    font-size: 16px;
}

.recommendation-description {
    color: #555;
    line-height: 1.5;
}

/* Tabs for detailed information */
.ssl-details-tabs {
    margin: 30px 0;
}

.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;
    font-size: 14px;
    margin-right: 10px;
}

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

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

.tab-content.active {
    display: block;
}

/* Unified form styles will come from global-styles.css */
/* .ssl-form {} */
/* .form-group {} */
/* .input-group {} */

.input-group input[type="text"].form-control,
.input-group select.form-control {
    /* Ensure it uses global form-control styles as a base */
    /* Specific overrides for being part of an input group */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    /* Height should be inherited from .form-control min-height */
}

.input-group button.btn {
    /* Ensure it uses global btn styles as a base */
    /* Specific overrides for being part of an input group */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    /* Height should align with .form-control min-height, which btn should do by default if padding is similar */
    /* Colors and borders should ideally come from .btn-primary, .btn-secondary etc. */
}

/* Ensure the button aligns with the input field height */
.input-group .form-control,
.input-group .btn {
    line-height: var(--line-height-normal); /* Match form-control */
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

/* 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%;
    }
}

/* TLS/Cipher information */
.tls-info {
    margin: 20px 0;
}

.cipher-rating {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    margin-left: 10px;
}

.cipher-strong {
    background-color: #e6ffe6;
    color: #006600;
}

.cipher-moderate {
    background-color: #fffaee;
    color: #b8a000;
}

.cipher-acceptable {
    background-color: #f0f0f0;
    color: #555;
}

.cipher-weak {
    background-color: #ffeeee;
    color: #cc0000;
}

/* Certificate Information Details */
.cert-details {
    margin: 20px 0;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.detail-label {
    flex: 0 0 30%;
    font-weight: bold;
    color: #555;
}

.detail-value {
    flex: 0 0 70%;
}

.alt-names-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.alt-names-list li {
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 3px;
}

.expired {
    color: #cc0000;
    font-weight: bold;
}

.expiring-soon {
    color: #e07000;
    font-weight: bold;
}

.valid {
    color: #009933;
}

/* Print styles */
@media print {
    .ssl-form, .tool-info, .tabs-nav {
        display: none;
    }
    
    .tab-content {
        display: block !important;
    }
    
    .ssl-results-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ssl-details-summary {
        flex-direction: column;
    }
    
    .security-rating-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .cert-info-row {
        flex-direction: column;
    }
    
    .cert-info-label, .cert-info-value {
        flex: 0 0 100%;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 0 auto;
        text-align: center;
        font-size: 12px;
        padding: 8px 10px;
    }
}

.ssl-checker-page .validity-indicator {
    font-size: 3rem;
    line-height: 1;
}
.ssl-checker-page .validity-indicator .fa-check-circle {
    color: #28a745;
}
.ssl-checker-page .validity-indicator .fa-exclamation-triangle {
    color: #ffc107;
}
.ssl-checker-page .validity-indicator .fa-times-circle {
    color: #dc3545;
}
.ssl-checker-page .accordion .btn-link {
    color: #007bff;
    text-decoration: none;
    width: 100%;
    text-align: left;
    font-weight: bold;
}
.ssl-checker-page .accordion .card-header {
    padding: 0.5rem 1.25rem;
}
.ssl-checker-page .certificate-pem {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.ssl-checker-page .security-recommendation {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}
.ssl-checker-page .security-recommendation.good {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}
.ssl-checker-page .security-recommendation.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}
.ssl-checker-page .security-recommendation.danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}
.ssl-checker-page .cert-chain-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}
.ssl-checker-page .cert-chain-item .arrow {
    text-align: center;
    font-size: 1.5rem;
    color: #6c757d;
    margin: 0.5rem 0;
}
.ssl-checker-page .san-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    font-size: 0.9rem;
} 