/* SEO Rank Checker Frontend Widget Styles */

.seo-rank-checker-widget {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    border: 1px solid #e5e7eb;
}

/* Tema stilleri */
.seo-rank-checker-widget[data-theme="light"] {
    background: #ffffff;
    border-color: #e5e7eb;
}

.seo-rank-checker-widget[data-theme="dark"] {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.seo-rank-checker-widget[data-theme="blue"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #5a67d8;
    color: white;
}

/* Boyut stilleri */
.seo-rank-checker-widget[data-size="compact"] {
    font-size: 14px;
}

.seo-rank-checker-widget[data-size="normal"] {
    font-size: 16px;
}

.seo-rank-checker-widget[data-size="large"] {
    font-size: 18px;
}

/* Header */
.src-widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    text-align: center;
}

.src-widget-title {
    margin: 0;
    color: white;
    font-size: 1.5em;
    font-weight: 600;
}

[data-theme="dark"] .src-widget-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

[data-theme="blue"] .src-widget-header {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Form */
.src-widget-form {
    padding: 25px;
}

.src-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

[data-size="compact"] .src-form-grid {
    gap: 15px;
    margin-bottom: 20px;
}

[data-size="large"] .src-form-grid {
    gap: 25px;
    margin-bottom: 30px;
}

.src-field {
    display: flex;
    flex-direction: column;
}

.src-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.9em;
}

[data-theme="dark"] .src-field label {
    color: #d1d5db;
}

[data-theme="blue"] .src-field label {
    color: rgba(255, 255, 255, 0.9);
}

.src-field input,
.src-field select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1em;
    transition: all 0.3s ease;
    outline: none;
}

.src-field input:focus,
.src-field select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .src-field input,
[data-theme="dark"] .src-field select {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .src-field input:focus,
[data-theme="dark"] .src-field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

[data-theme="blue"] .src-field input,
[data-theme="blue"] .src-field select {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

[data-theme="blue"] .src-field input::placeholder,
[data-theme="blue"] .src-field select option {
    color: rgba(255, 255, 255, 0.7);
}

/* Güvenlik Bölümü */
.src-security-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.src-security-code {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 12px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

[data-theme="dark"] .src-security-code {
    background: #374151;
    border-color: #4b5563;
}

[data-theme="blue"] .src-security-code {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.generated-code {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #1f2937;
    min-width: 80px;
    text-align: center;
}

[data-theme="dark"] .generated-code {
    color: #f9fafb;
}

[data-theme="blue"] .generated-code {
    color: white;
}

.refresh-code {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #6b7280;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.refresh-code:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
    transform: rotate(180deg);
}

[data-theme="dark"] .refresh-code {
    color: #9ca3af;
}

[data-theme="dark"] .refresh-code:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
}

[data-theme="blue"] .refresh-code {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="blue"] .refresh-code:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.security-code {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    font-size: 1em;
    background: white;
    outline: none;
}

.security-code:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .security-code {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="blue"] .security-code {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.src-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.src-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.3);
}

.src-search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.src-loading {
    text-align: center;
    padding: 40px;
    background: rgba(102, 126, 234, 0.02);
    margin: 20px;
    border-radius: 12px;
}

.src-spinner {
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-message {
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

[data-theme="dark"] .loading-message {
    color: #9ca3af;
}

[data-theme="blue"] .loading-message {
    color: rgba(255, 255, 255, 0.8);
}

/* Sonuçlar */
.src-results {
    padding: 25px;
    border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .src-results {
    border-top-color: #374151;
}

[data-theme="blue"] .src-results {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.src-results-header h4 {
    color: #1f2937;
    margin: 0 0 20px;
    font-size: 1.2em;
    font-weight: 600;
}

[data-theme="dark"] .src-results-header h4 {
    color: #f9fafb;
}

[data-theme="blue"] .src-results-header h4 {
    color: white;
}

.src-results-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.src-result-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.src-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .src-result-item {
    background: #374151;
    border-color: #4b5563;
}

[data-theme="blue"] .src-result-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.src-result-target {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

[data-theme="dark"] .src-result-target {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

[data-theme="blue"] .src-result-target {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.src-position {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    font-size: 0.9em;
}

.src-pos-1 { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.src-pos-2 { background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%); }
.src-pos-3 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.src-pos-target { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.src-pos-default { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); }

.src-result-content {
    flex: 1;
}

.src-result-content h4 {
    color: #1e40af;
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
}

[data-theme="dark"] .src-result-content h4 {
    color: #93c5fd;
}

[data-theme="blue"] .src-result-content h4 {
    color: white;
}

.src-url {
    color: #10b981;
    font-size: 0.85em;
    margin: 0 0 8px;
    word-break: break-all;
    font-weight: 500;
}

.src-description {
    color: #6b7280;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.5;
}

[data-theme="dark"] .src-description {
    color: #9ca3af;
}

[data-theme="blue"] .src-description {
    color: rgba(255, 255, 255, 0.8);
}

.src-check-mark {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 25px;
    height: 25px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    animation: checkmark-bounce 0.5s ease-in-out;
}

@keyframes checkmark-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Sonuç Özeti */
.src-result-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

[data-theme="dark"] .src-result-card {
    background: #374151;
    border-color: #4b5563;
}

[data-theme="blue"] .src-result-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.src-result-card.src-found {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

[data-theme="dark"] .src-result-card.src-found {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

[data-theme="blue"] .src-result-card.src-found {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.src-result-card.src-not-found {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fca5a5 20%);
}

[data-theme="dark"] .src-result-card.src-not-found {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}

[data-theme="blue"] .src-result-card.src-not-found {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.result-icon {
    font-size: 3em;
    margin-bottom: 15px;
    animation: result-icon-bounce 0.6s ease-in-out;
}

@keyframes result-icon-bounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.result-text {
    font-size: 0.9em;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 500;
}

[data-theme="dark"] .result-text {
    color: #d1d5db;
}

[data-theme="blue"] .result-text {
    color: rgba(255, 255, 255, 0.9);
}

.src-result-details {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    font-size: 0.8em;
    color: #6b7280;
}

[data-theme="dark"] .src-result-details {
    border-top-color: #4b5563;
    color: #9ca3af;
}

[data-theme="blue"] .src-result-details {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.src-result-details p {
    margin: 5px 0;
}

/* Benzer Anahtar Kelimeler */
.src-related-keywords {
    padding: 25px;
    border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .src-related-keywords {
    border-top-color: #374151;
}

[data-theme="blue"] .src-related-keywords {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.src-related-keywords h4 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .src-related-keywords h4 {
    color: #f9fafb;
}

[data-theme="blue"] .src-related-keywords h4 {
    color: white;
}

.src-related-keywords h4:before {
    content: "🔍";
    font-size: 1.2em;
}

.related-keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.src-keyword-badge {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
}

.src-keyword-badge:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.src-keyword-badge.src-keyword-active {
    background: #6366f1;
    border-color: #4338ca;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .src-keyword-badge {
    background: #4b5563;
    border-color: #6b7280;
    color: #d1d5db;
}

[data-theme="dark"] .src-keyword-badge:hover,
[data-theme="dark"] .src-keyword-badge.src-keyword-active {
    background: #6366f1;
    border-color: #4338ca;
    color: white;
}

[data-theme="blue"] .src-keyword-badge {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

[data-theme="blue"] .src-keyword-badge:hover,
[data-theme="blue"] .src-keyword-badge.src-keyword-active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.src-help-text {
    font-size: 0.8em;
    color: #6b7280;
    margin: 0;
    font-style: italic;
}

[data-theme="dark"] .src-help-text {
    color: #9ca3af;
}

[data-theme="blue"] .src-help-text {
    color: rgba(255, 255, 255, 0.7);
}

.src-error {
    color: #ef4444;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.9em;
    padding: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

[data-theme="dark"] .src-error {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fca5a5;
}

[data-theme="blue"] .src-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .src-form-grid {
        grid-template-columns: 1fr;
    }
    
    .src-security-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .security-code {
        width: 100%;
    }
    
    .src-search-btn {
        width: 100%;
    }
    
    .src-results-grid {
        grid-template-columns: 1fr;
    }
    
    .related-keywords-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .seo-rank-checker-widget {
        margin: 10px 0;
    }
    
    .src-widget-form,
    .src-results,
    .src-related-keywords {
        padding: 15px;
    }
    
    .src-form-grid {
        gap: 15px;
    }
    
    .src-security-section {
        gap: 10px;
    }
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.src-results,
.src-related-keywords {
    animation: fadeInUp 0.5s ease-out;
}

.src-result-item {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.src-result-item:nth-child(1) { animation-delay: 0.1s; }
.src-result-item:nth-child(2) { animation-delay: 0.2s; }
.src-result-item:nth-child(3) { animation-delay: 0.3s; }
.src-result-item:nth-child(4) { animation-delay: 0.4s; }
.src-result-item:nth-child(5) { animation-delay: 0.5s; }