/* Lighthouse Performance Analyzer Styles */

.lpa-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpa-header {
    text-align: center;
    margin-bottom: 40px;
}

.lpa-header h2 {
    color: #2245C4;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.lpa-header p {
    color: #000;
    font-size: 16px;
    margin: 0;
}

.lpa-form {
    margin-bottom: 40px;
}

.lpa-form-group {
    margin-bottom: 25px;
}

.lpa-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.lpa-form-group input[type="email"],
.lpa-form-group input[type="url"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.lpa-form-group input[type="email"]:focus,
.lpa-form-group input[type="url"]:focus {
    outline: none;
    border-color: #2245C4;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.lpa-submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg,#000000 30%,#2245C4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lpa-submit-btn:hover {
    transform: translateY(-2px);
	color: white;
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.3);
}

.lpa-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lpa-loading {
    display: none;
}

.lpa-submit-btn.loading .lpa-btn-text {
    display: none;
}

.lpa-submit-btn.loading .lpa-loading {
    display: inline;
}

.lpa-results {
    margin-top: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.lpa-results-header h3 {
    color: #2245C4;
    margin: 0 0 25px 0;
    font-size: 24px;
    text-align: center;
}

.lpa-website-info h4 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 18px;
    text-align: center;
    word-break: break-all;
}

.lpa-device-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.lpa-tab-btn {
    padding: 12px 24px;
    border: 2px solid #e1e8ed;
    background: white;
    color: #000;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.lpa-tab-btn.active,
.lpa-tab-btn:hover {
    background: #2245C4;
    color: white;
    border-color: #2245C4;
}

.lpa-device-results {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lpa-performance-score {
    text-align: center;
    margin-bottom: 30px;
}

.lpa-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
    border: 8px solid;
}

.lpa-score-circle.lpa-good {
    border-color: #007f4e;
    background: rgba(12, 206, 107, 0.1);
}

.lpa-score-circle.lpa-needs-improvement {
    border-color: #f37324;
    background: rgba(255, 164, 0, 0.1);
}

.lpa-score-circle.lpa-poor {
    border-color: #e12729;
    background: rgba(255, 78, 66, 0.1);
}

.lpa-score-number {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.lpa-performance-score p {
    margin: 0;
    font-weight: 600;
    color: #000;
    font-size: 18px;
}

.lpa-core-vitals {
    margin-bottom: 30px;
}

.lpa-core-vitals h5 {
    color: #000;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
}

.lpa-vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.lpa-vital-item {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 4px solid;
}

.lpa-vital-item.lpa-good {
    border-color: #007f4e;
    background: rgba(12, 206, 107, 0.05);
}

.lpa-vital-item.lpa-needs-improvement {
    border-color: #f37324;
    background: rgba(255, 164, 0, 0.05);
}

.lpa-vital-item.lpa-poor {
    border-color: #e12729;
    background: rgba(255, 78, 66, 0.05);
}

.lpa-vital-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.lpa-vital-value {
    font-size: 18px;
    font-weight: 700;
    color: #2245C4;
}

.lpa-opportunities h5 {
    color: #000;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
}

.lpa-opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lpa-opportunity-item {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2245C4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lpa-opportunity-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.lpa-opportunity-desc {
    color: #000;
    line-height: 1.5;
    margin-bottom: 8px;
    font-size: 14px;
}

.lpa-opportunity-desc a {
    color: #2245C4;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.lpa-opportunity-desc a:hover {
    color: #1D2855;
    text-decoration: none;
}

.lpa-opportunity-savings {
    color: #007f4e;
    font-weight: 600;
    font-size: 14px;
}

.lpa-recommendations-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #e3f2fd;
    border-radius: 5px;
    border-left: 4px solid #2196f3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lpa-error {
    padding: 20px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    text-align: center;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lpa-container {
        margin: 10px;
        padding: 20px;
    }
    
    .lpa-header h2 {
        font-size: 24px;
    }
    
    .lpa-vitals-grid {
        grid-template-columns: 1fr;
    }
    
    .lpa-device-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .lpa-tab-btn {
        width: 200px;
    }
    
    .lpa-score-circle {
        width: 100px;
        height: 100px;
    }
    
    .lpa-score-number {
        font-size: 28px;
    }
}

/* Loading Animation */
.lpa-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s ease infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Progress Messages */
.lpa-progress {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f8ff, #e3f2fd);
    border: 2px solid #2245C4;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.lpa-progress-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.lpa-progress-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e1e8ed;
    border-top-color: #2245C4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.lpa-progress-text {
    color: #2245C4;
    font-weight: 600;
    font-size: 16px;
}

/* Success Message */
.lpa-success {
    padding: 15px 20px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    color: #2f855a;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
}

.lpa-notification {
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.lpa-notification-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lpa-notification-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lpa-hubspot-indicator {
    display: inline-block;
    padding: 5px 10px;
    background: #28a745;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 10px;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lpa-platform-security {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lpa-platform-security h5 {
    color: #2245C4;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lpa-platform-security h5:before {
    content: "🔍";
    font-size: 20px;
}

.lpa-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.lpa-info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.lpa-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.lpa-info-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lpa-info-value {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

.lpa-info-value small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* WordPress Detection Confidence Levels */
.lpa-confidence-high {
    color: #007f4e;
    font-weight: 600;
}

.lpa-confidence-medium {
    color: #f37324;
    font-weight: 600;
}

.lpa-confidence-low {
    color: #ff9800;
    font-weight: 600;
}

.lpa-confidence-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: normal;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lpa-confidence-high .lpa-confidence-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.lpa-confidence-medium .lpa-confidence-badge {
    background-color: #fff3e0;
    color: #e65100;
}

.lpa-confidence-low .lpa-confidence-badge {
    background-color: #fbe9e7;
    color: #bf360c;
}

/* SSL Certificate Status Styling */
.lpa-ssl-valid {
    color: #007f4e;
    font-weight: 600;
}

.lpa-ssl-valid small {
    color: #007f4e;
}

.lpa-ssl-invalid {
    color: #f37324;
    font-weight: 600;
}

.lpa-ssl-invalid small {
    color: #ff9800;
}

.lpa-ssl-none {
    color: #e12729;
    font-weight: 600;
}

.lpa-ssl-none small {
    color: #f44336;
}

/* WordPress Version Badge */
.lpa-wp-version {
    display: inline-block;
    background: #21759b;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* SSL Expiry Warning Colors */
.lpa-ssl-expiry-good {
    color: #4caf50;
}

.lpa-ssl-expiry-warning {
    color: #ff9800;
    font-weight: bold;
}

.lpa-ssl-expiry-critical {
    color: #f44336;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Icons for Platform & Security */
.lpa-platform-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lpa-info-grid {
        grid-template-columns: 1fr;
    }
    
    .lpa-platform-security {
        padding: 15px;
    }
    
    .lpa-info-item {
        padding: 12px;
    }
}

/* Print Styles */
@media print {
    .lpa-platform-security {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .lpa-info-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Loading State for Detection */
.lpa-detection-loading {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.lpa-detection-loading:after {
    content: "...";
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}