/**
 * WP Site Performance Detection - IsItWP Styles
 */

.wp-isitwp-container {
    max-width: 800px;
    margin: 0 auto;
    color: #1e1e1e;
    line-height: 1.6;
}

.wp-isitwp-container * {
    box-sizing: border-box;
}

/* ==================== Search Form ==================== */
.wp-isitwp-search-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wp-isitwp-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.wp-isitwp-url-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.wp-isitwp-url-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.12);
}

.wp-isitwp-submit-btn {
    padding: 14px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    min-width: 120px;
}

.wp-isitwp-submit-btn:hover { background: #135e96; }
.wp-isitwp-submit-btn:disabled { background: #a7aaad; cursor: not-allowed; }

.wp-isitwp-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wp-isitwp-spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

/* ==================== Messages ==================== */
.wp-isitwp-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #d63638;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wp-isitwp-loading {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.wp-isitwp-loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wp-isitwp-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* ==================== Results ==================== */
.wp-isitwp-results {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

/* Result Header */
.wp-isitwp-result-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

.wp-isitwp-result-header.is-wp {
    background: #edfaef;
    color: #00a32a;
}

.wp-isitwp-result-header.not-wp {
    background: #fcf0f1;
    color: #d63638;
}

.wp-isitwp-result-icon {
    font-size: 32px;
    flex-shrink: 0;
    color: #00a32a;
}
.wp-isitwp-result-icon .fa-circle-xmark { color: #d63638; }

/* Main: Screenshot + Info */
.wp-isitwp-main {
    display: flex;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.wp-isitwp-screenshot-wrap {
    width: 300px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f7f7;
}

.wp-isitwp-screenshot {
    width: 100%;
    display: block;
}

.wp-isitwp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.wp-isitwp-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.wp-isitwp-info-label {
    color: #646970;
    font-weight: 600;
    min-width: 120px;
}

.wp-isitwp-info-value {
    color: #1e1e1e;
    word-break: break-all;
}

.wp-isitwp-whois-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.wp-isitwp-whois-link:hover {
    text-decoration: underline;
}

/* Evidence */
.wp-isitwp-evidence {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.wp-isitwp-evidence-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #3c434a;
}

.wp-isitwp-evidence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-isitwp-evidence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 6px;
    font-size: 13px;
}

.wp-isitwp-evidence-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.wp-isitwp-evidence-icon.found {
    color: #00a32a;
}

.wp-isitwp-evidence-icon.not-found {
    color: #d63638;
}

.wp-isitwp-evidence-label {
    font-weight: 600;
    flex: 1;
}

.wp-isitwp-evidence-detail {
    color: #646970;
    font-size: 12px;
}

/* WP Details Sections */
.wp-isitwp-wp-details {
    padding: 24px;
}

.wp-isitwp-section {
    margin-bottom: 24px;
}

.wp-isitwp-section:last-child {
    margin-bottom: 0;
}

.wp-isitwp-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e1e1e;
}

/* Theme Details */
.wp-isitwp-theme-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.wp-isitwp-theme-screenshot {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.wp-isitwp-theme-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.wp-isitwp-theme-meta {
    font-size: 13px;
    color: #646970;
}

.wp-isitwp-theme-meta span + span::before {
    content: " · ";
}

.wp-isitwp-theme-parent {
    font-size: 13px;
    color: #2271b1;
    margin-top: 4px;
}

/* Plugin List */
.wp-isitwp-plugins-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-isitwp-plugin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.wp-isitwp-plugin-name {
    font-weight: 600;
    flex: 1;
}

.wp-isitwp-plugin-confidence {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #646970;
}

.wp-isitwp-confidence-bar {
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.wp-isitwp-confidence-fill {
    height: 100%;
    border-radius: 2px;
}

.wp-isitwp-confidence-fill.high { background: #00a32a; }
.wp-isitwp-confidence-fill.medium { background: #dba617; }
.wp-isitwp-confidence-fill.low { background: #d63638; }

/* Full Analysis Link */
.wp-isitwp-full-analysis {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.wp-isitwp-full-analysis .wp-block-button__link {
    position: relative;
    background-color: #2271b1;
    border-radius: 3px 3px 6px 6px;
    border-color: #135e96;
    border-width: 0 0 4px 0;
    border-style: solid;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: inherit;
    padding: 8px 16px;
    text-decoration: none;
    text-transform: uppercase;
}
.wp-isitwp-full-analysis .wp-block-button__link:after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061";
    display: inline-block;
    margin: 0 0 0 1em;
    transition: all .5s cubic-bezier(.345,0,.145,.995);
    vertical-align: -10%;
}
.wp-isitwp-full-analysis .wp-block-button__link:hover:after {
    transform: translateX(4px) scale(1.1);
}
.wp-isitwp-full-analysis .wp-block-button__link:hover {
    background-color: #135e96;
    color: #fff;
}

/* Ad Spot */
.wp-isitwp-ad-spot {
    margin-top: 20px;
    padding: 16px;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    background: #fafafa;
}

.wp-isitwp-ad-spot > * {
    max-width: 100%;
}

.wp-isitwp-non-wp-ad {
    padding: 24px;
    border-top: 1px solid #f0f0f0;
}

/* No results placeholder */
.wp-isitwp-no-plugins {
    color: #646970;
    font-size: 13px;
    font-style: italic;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .wp-isitwp-input-group {
        flex-direction: column;
    }

    .wp-isitwp-submit-btn {
        width: 100%;
    }

    .wp-isitwp-main {
        flex-direction: column;
    }

    .wp-isitwp-screenshot-wrap {
        width: 100%;
    }

    .wp-isitwp-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .wp-isitwp-info-label {
        min-width: auto;
    }

    .wp-isitwp-result-header {
        font-size: 15px;
        flex-wrap: wrap;
    }
}
