/* SEO Audit Pro - Frontend Widget Styles */

.seo-audit-widget {
    max-width: 600px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.widget-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget-container:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Widget Header */
.widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.widget-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.widget-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.widget-title {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Widget Body */
.widget-body {
    padding: 40px;
}

.seo-audit-widget-form .form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.widget-button {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.widget-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.widget-button:hover::before {
    width: 300px;
    height: 300px;
}

.widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.widget-button:active {
    transform: translateY(0);
}

.widget-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-text,
.button-loader {
    position: relative;
    z-index: 1;
}

.button-loader .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.widget-privacy {
    margin-top: 15px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

/* Widget Results */
.widget-results-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results-score {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    margin-bottom: 30px;
}

.results-score .score-circle {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    color: #fff;
    position: relative;
}

.results-score .score-circle::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.score-max {
    font-size: 18px;
    opacity: 0.9;
}

.score-excellent { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.score-good { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.score-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.score-critical { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.results-score h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #111827;
}

.status-text {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}

.status-text.status-excellent {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-text.status-good {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.status-text.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.status-text.status-critical {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

/* Audit Breakdown */
.results-breakdown h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #111827;
}

.audit-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.audit-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.audit-item-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: #fff;
}

.audit-icon {
    font-size: 24px;
    line-height: 1;
}

.audit-name {
    flex: 1;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.audit-score {
    font-weight: 700;
    font-size: 16px;
    padding: 4px 12px;
    border-radius: 12px;
}

.audit-score.score-excellent {
    background: #d1fae5;
    color: #065f46;
}

.audit-score.score-good {
    background: #dbeafe;
    color: #1e40af;
}

.audit-score.score-warning {
    background: #fed7aa;
    color: #92400e;
}

.audit-score.score-critical {
    background: #fee2e2;
    color: #991b1b;
}

.audit-item-details {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f9fafb;
}

.audit-item.expanded .audit-item-details {
    padding: 15px 20px;
    max-height: 500px;
}

.audit-item-details .passed-items,
.audit-item-details .issue-items {
    margin-bottom: 10px;
}

.audit-item-details ul {
    margin: 5px 0;
    padding-left: 20px;
}

.audit-item-details li {
    font-size: 13px;
    margin: 3px 0;
    color: #4b5563;
    line-height: 1.5;
}

.item-issues {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.item-issues strong {
    color: #374151;
}

/* Results CTA */
.results-cta {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    color: #fff;
}

.results-cta h4 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
}

.results-cta p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.95;
}

.cta-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Results Actions */
.results-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-secondary {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Widget Footer */
.widget-footer {
    padding: 20px 40px;
    background: #f9fafb;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.widget-footer p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.widget-footer strong {
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .seo-audit-widget {
        margin: 20px;
    }
    
    .widget-header {
        padding: 40px 30px;
    }
    
    .widget-title {
        font-size: 26px;
    }
    
    .widget-subtitle {
        font-size: 16px;
    }
    
    .widget-body {
        padding: 30px 25px;
    }
    
    .results-score .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 40px;
    }
    
    .widget-footer {
        padding: 15px 25px;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f3f4f6 0%, #e5e7eb 20%, #f3f4f6 40%, #f3f4f6 100%);
    background-size: 1000px 100%;
}

/* Traffic Light Indicator */
.traffic-light {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.traffic-light.green {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.traffic-light.yellow {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.traffic-light.red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Status Icons for Audit Items */
.status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.status-icon.status-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-icon.status-yellow {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.status-icon.status-orange {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.4);
}

.status-icon.status-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Widget Package Banner */
.widget-package-banner {
    margin-top: 30px;
    animation: slideInUp 0.5s ease;
}

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

.package-banner-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.package-banner-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

.package-ribbon {
    position: absolute;
    top: 20px;
    right: -35px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 8px 45px;
    font-weight: 700;
    font-size: 12px;
    transform: rotate(45deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.package-banner-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.package-banner-content {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 25px;
    color: #111827;
    position: relative;
    z-index: 1;
    display: grid;
    gap: 20px;
}

.package-info h5 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #111827;
    font-weight: 700;
}

.package-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.package-price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-tag .price {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.price-tag .period {
    font-size: 16px;
    color: #6b7280;
}

.package-cta-widget {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.package-cta-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.package-features-compact {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    position: relative;
    z-index: 1;
    color: #111827;
}

.package-features-compact strong {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
}

.feature-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 20px;
    font-size: 13px;
    margin: 0 8px 8px 0;
    font-weight: 500;
}

.feature-tag:first-of-type {
    background: #d1fae5;
    color: #065f46;
}

/* Responsive Widget Package */
@media (max-width: 768px) {
    .package-banner-wrapper {
        padding: 25px 20px;
    }
    
    .package-banner-title {
        font-size: 18px;
    }
    
    .package-banner-content {
        padding: 20px;
    }
    
    .package-price-box {
        flex-direction: column;
        text-align: center;
    }
    
    .package-cta-widget {
        width: 100%;
    }
    
    .price-tag .price {
        font-size: 28px;
    }
    
    .package-ribbon {
        font-size: 10px;
        padding: 6px 35px;
    }
}