/* SSL Checker Specific Styles */
:root {
    --ssl-primary-color: #5a5ce6;
    --ssl-success-color: #10b981;
    --ssl-warning-color: #f59e0b;
    --ssl-danger-color: #ef4444;
    --ssl-info-color: #3b82f6;
    --ssl-text-color: #1f2937;
    --ssl-gray-text: #6b7280;
    --ssl-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Override tools_box hover effects for SSL checker pages */
.ssl-checker-page .tools_box {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 24px !important;
    overflow: hidden !important;
    height: 100% !important;
    box-shadow: var(--ssl-card-shadow) !important;
    transition: none !important;
    transform: none !important;
}

.ssl-checker-page .tools_box:hover {
    transform: none !important;
}

/* SSL Checker Main Form Container */
.ssl-checker-main {
    text-align: center;
    padding: 24px !important;
}

.ssl-form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ssl-text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ssl-form-subtitle {
    font-size: 16px;
    color: var(--ssl-gray-text);
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ssl-main-form {
    margin-top: 35px;
}

.ssl-input-container {
    margin-bottom: 30px;
}

/* SSL Input Group Styling */
.ssl-input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
    max-width: 100%;
}

.ssl-input-icon {
    background: linear-gradient(135deg, var(--ssl-primary-color), #8183ff);
    color: white;
    border: none;
    padding: 0 16px;
    font-size: 16px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssl-url-input {
    border: none;
    padding: 16px 20px;
    font-size: 15px;
    background: white;
    color: var(--ssl-text-color);
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.ssl-url-input::placeholder {
    color: #9ca3af;
    font-size: 14px;
}

.ssl-url-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

/* SSL Check Button */
.ssl-check-button {
    background: linear-gradient(135deg, var(--ssl-success-color), #059669);
    color: white;
    border: none;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    min-width: 160px;
}

.ssl-check-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    color: white !important;
}

.ssl-check-button:focus {
    background: linear-gradient(135deg, #059669, #047857);
    color: white !important;
    box-shadow: none;
    outline: none;
}

.ssl-check-button:active {
    background: linear-gradient(135deg, #047857, #065f46);
    color: white !important;
    transform: translateY(0);
}

.ssl-input-help {
    text-align: center;
    margin-top: 12px;
}

/* Quick Examples Section */
.ssl-examples-section {
    margin-top: 25px;
    margin-bottom: 40px;
}

.ssl-quick-examples {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.examples-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ssl-text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.examples-title i {
    color: var(--ssl-warning-color);
}

.examples-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.example-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--ssl-text-color);
    min-width: 130px;
    justify-content: center;
}

.example-card:hover {
    border-color: var(--ssl-primary-color);
    background: rgba(90, 92, 230, 0.05);
    transform: translateY(-2px);
}

.example-card i {
    font-size: 16px;
    color: var(--ssl-primary-color);
}

.example-card span {
    font-size: 13px;
}

/* Loading States */
.ssl-loading-container {
    margin-top: 40px;
    padding: 50px 30px;
    background: #f8f9fa;
    border-radius: 15px;
    text-align: center;
}

.ssl-loading-content {
    max-width: 400px;
    margin: 0 auto;
}

.ssl-loading-spinner {
    margin-bottom: 25px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--ssl-primary-color);
    border-radius: 50%;
    animation: ssl-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes ssl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ssl-text-color);
    margin-bottom: 10px;
}

.loading-text {
    color: var(--ssl-gray-text);
    margin: 0;
}

/* Error States */
.ssl-error-container {
    margin-top: 40px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 15px;
    padding: 25px;
}

.ssl-error-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.ssl-error-icon {
    font-size: 24px;
    color: var(--ssl-danger-color);
    margin-top: 2px;
}

.ssl-error-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ssl-danger-color);
    margin-bottom: 8px;
}

.ssl-error-text {
    color: #991b1b;
    margin: 0;
    line-height: 1.5;
}

/* SSL Results Display */
.ssl-results-main {
    padding: 24px !important;
    scroll-margin-top: 20px; /* Ensures proper scroll positioning */
}

/* SSL Results Header */
.ssl-results-header {
    border-bottom: 2px solid #f1f5f9;

}

/* Check Another Certificate Button */
.ssl-new-check-btn {
    background: white;
    border: 2px solid var(--ssl-primary-color);
    color: var(--ssl-primary-color);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ssl-new-check-btn:hover {
    background: var(--ssl-primary-color);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(90, 92, 230, 0.2);
}

.ssl-new-check-btn:focus {
    background: var(--ssl-primary-color);
    color: white !important;
    box-shadow: 0 0 0 3px rgba(90, 92, 230, 0.2);
    outline: none;
}

/* Add a subtle highlight animation when results appear */
.ssl-results-main.show-results {
    animation: ssl-results-appear 0.6s ease-out;
}

@keyframes ssl-results-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for container switching */
#sslFormContainer,
#sslResultsContainer {
    transition: all 0.4s ease-in-out;
}

/* Try Again Button Styling */
#tryAgainBtn {
    background: linear-gradient(135deg, var(--ssl-primary-color), #8183ff);
    border: none;
    margin-top: 15px;
}

.ssl-default-state {
    padding: 24px !important;
    text-align: center;
}

.ssl-placeholder-content {
    max-width: 800px;
    margin: 0 auto;
}

.ssl-placeholder-header {
    margin-bottom: 40px;
}

.ssl-placeholder-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--ssl-success-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 36px;
}

.ssl-placeholder-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ssl-text-color);
    margin-bottom: 15px;
}

.ssl-placeholder-text {
    font-size: 16px;
    color: var(--ssl-gray-text);
    margin-bottom: 0;
    line-height: 1.6;
}

/* SSL Features Grid */
.ssl-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.ssl-feature-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.ssl-feature-preview:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
}

.feature-preview-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 20px;
}

.feature-preview-icon.bg-primary {
    background: linear-gradient(135deg, var(--ssl-primary-color), #8183ff);
}

.feature-preview-icon.bg-success {
    background: linear-gradient(135deg, var(--ssl-success-color), #059669);
}

.feature-preview-icon.bg-info {
    background: linear-gradient(135deg, var(--ssl-info-color), #2563eb);
}

.feature-preview-icon.bg-warning {
    background: linear-gradient(135deg, var(--ssl-warning-color), #d97706);
}

.ssl-feature-preview h6 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ssl-text-color);
    margin-bottom: 8px;
}

.ssl-feature-preview p {
    font-size: 13px;
    color: var(--ssl-gray-text);
    margin: 0;
    line-height: 1.4;
}

/* SSL Content Section */
.ssl-content-section {
    padding: 24px !important;
}

.ssl-content-block {
    height: 100%;
}

.ssl-content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ssl-text-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.ssl-content-text {
    margin-bottom: 35px;
}

.lead-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--ssl-text-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.ssl-content-text p {
    font-size: 16px;
    color: var(--ssl-gray-text);
    line-height: 1.7;
    margin-bottom: 15px;
}

.features-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--ssl-text-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

/* SSL Check and Benefits Grids */
.ssl-check-grid,
.ssl-benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.check-item,
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.check-item:hover,
.benefit-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.check-icon,
.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
}

.check-content,
.benefit-content {
    flex: 1;
}

.check-content h6,
.benefit-content h6 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ssl-text-color);
    margin-bottom: 5px;
}

.check-content p,
.benefit-content p {
    font-size: 14px;
    color: var(--ssl-gray-text);
    margin: 0;
    line-height: 1.5;
}

/* Pro Tip Section */
.ssl-pro-tip-full-width {
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
    border-left: 4px solid var(--ssl-info-color);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
}

.pro-tip-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--ssl-info-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.ssl-pro-tip-full-width p {
    font-size: 15px;
    color: #0277bd;
    margin: 0;
    line-height: 1.6;
}

/* SSL Status Results */
.ssl-status-header {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
   
    position: relative;
    overflow: hidden;
}

.ssl-status-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.ssl-status-header.valid {
    background: linear-gradient(135deg, var(--ssl-success-color), #059669);
    color: white;
}

.ssl-status-header.warning {
    background: linear-gradient(135deg, var(--ssl-warning-color), #d97706);
    color: white;
}

.ssl-status-header.expired {
    background: linear-gradient(135deg, var(--ssl-danger-color), #dc2626);
    color: white;
}

.ssl-status-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.ssl-status-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ssl-status-domain {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

/* SSL Info Grid for Results */
.ssl-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ssl-info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--ssl-primary-color);
    transition: all 0.2s ease;
}

/* Specific border colors for SSL info cards */
.ssl-info-card.valid-from {
    border-left-color: var(--ssl-success-color);
}

.ssl-info-card.valid-to {
    border-left-color: var(--ssl-warning-color);
}

.ssl-info-card.days-until-expiry {
    border-left-color: #ff6b6b;
}

.ssl-info-card.issuer {
    border-left-color: var(--ssl-primary-color);
}

.ssl-info-card:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.ssl-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ssl-gray-text);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssl-info-title i {
    color: var(--ssl-primary-color);
}

.ssl-info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--ssl-text-color);
    word-break: break-all;
    line-height: 1.4;
}

/* Expiry Alerts */
.ssl-expiry-warning {
    background: #fef3cd;
    border: 1px solid #ffeaa7;
    color: #8a6d3b;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ssl-expiry-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Protocol Support */
.protocol-support {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.protocol-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Subject Alternative Names */
.sans-list {
    max-height: 120px;
    overflow-y: auto;
    padding: 5px 0;
}

.sans-item {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin: 3px;
    display: inline-block;
}

/* Feature Cards */
.feature-card {
    padding: 20px;
    height: 100%;
    transition: none;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.feature-icon.bg-primary {
    background: linear-gradient(135deg, var(--ssl-primary-color), #8183ff);
}

.feature-icon.bg-success {
    background: linear-gradient(135deg, var(--ssl-success-color), #059669);
}

.feature-icon.bg-info {
    background: linear-gradient(135deg, var(--ssl-info-color), #2563eb);
}

.feature-icon.bg-warning {
    background: linear-gradient(135deg, var(--ssl-warning-color), #d97706);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ssl-text-color);
}

.feature-text {
    font-size: 14px;
    color: var(--ssl-gray-text);
    line-height: 1.5;
}

/* SSL Specific Flip Animation */
.ssl-checker-page .hero-description-line {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 30px;
    line-height: 2.4;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ssl-checker-page .hero-description-line .text {
    margin: 0 8px;
    font-weight: 500;
}

.ssl-checker-page .flip-box {
    height: 35px;
    width: 180px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ssl-checker-page .flip-box-inner {
    position: absolute;
    width: 100%;
    height: 400%;
    top: 0;
    left: 0;
    animation: ssl-flip-animation 12s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

.ssl-checker-page .flip-box-item {
    height: 35px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

@keyframes ssl-flip-animation {
    0%, 22% { transform: translateY(0); }
    25%, 47% { transform: translateY(-25%); }
    50%, 72% { transform: translateY(-50%); }
    75%, 97% { transform: translateY(-75%); }
    100% { transform: translateY(0); }
}

/* Color Backgrounds for SSL flip items */
.ssl-checker-page .bg-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ssl-checker-page .bg-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.ssl-checker-page .bg-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.ssl-checker-page .bg-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ssl-checker-main,
    .ssl-results-main,
    .ssl-default-state,
    .ssl-content-section {
        padding: 24px !important;
    }

    .ssl-form-title {
        font-size: 24px;
    }

    .ssl-placeholder-title {
        font-size: 24px;
    }

    .ssl-content-title {
        font-size: 20px;
    }

    .ssl-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ssl-check-grid,
    .ssl-benefits-grid {
        gap: 15px;
    }

    .examples-grid {
        justify-content: center;
        gap: 10px;
    }

    .example-card {
        min-width: 110px;
        padding: 10px 12px;
    }

    .ssl-input-group {
        flex-direction: column;
        border-radius: 12px;
    }

    .ssl-input-icon {
        border-radius: 12px 12px 0 0;
        padding: 15px;
    }

    .ssl-url-input {
        border-radius: 0;
        padding: 15px 20px;
    }

    .ssl-check-button {
        border-radius: 0 0 12px 12px;
        padding: 15px 25px;
    }

    .ssl-checker-page .hero-description-line {
        flex-direction: column;
        line-height: 1.8;
        font-size: 1rem;
    }

    .ssl-checker-page .hero-description-line .text {
        margin: 5px 0;
    }

    .ssl-checker-page .flip-box {
        width: 160px;
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .ssl-features-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .example-card {
        width: 200px;
    }

    .ssl-info-grid {
        grid-template-columns: 1fr;
    }

    .ssl-placeholder-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .feature-preview-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .ssl-content-section {
        padding: 24px !important;
    }

    .ssl-checker-page .hero-description-line {
        font-size: 0.95rem;
    }

    .ssl-checker-page .flip-box {
        width: 140px;
        height: 30px;
    }

    .ssl-checker-page .flip-box-item {
        height: 30px;
        font-size: 12px;
    }
}