/* Keyword Position Plugin Styles */
.keyword-position-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form Styles */
.keyword-position-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.keyword-position-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: #3498db;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.valid {
    border-color: #27ae60;
}

.form-control.invalid {
    border-color: #e74c3c;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Container */
.results-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    margin-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.results-header h3 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

.results-content {
    padding: 30px;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.summary-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.summary-item h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.position-high {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.position-medium {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.position-low {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.competition-low { color: #27ae60; font-weight: bold; }
.competition-medium { color: #f39c12; font-weight: bold; }
.competition-high { color: #e74c3c; font-weight: bold; }

/* Positions Table */
.positions-table h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.table-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.table-row:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.table-row.target-website {
    background: linear-gradient(135deg, #e8f4fd, #d6eaf8);
    border-color: #3498db;
    border-left: 4px solid #3498db;
}

.position-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.position-number {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.target-badge {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.content-cell h5 {
    margin: 0 0 5px 0;
    color: #1a0dab;
    font-size: 16px;
    line-height: 1.3;
}

.content-cell .result-url {
    color: #006621;
    font-size: 12px;
    margin: 0 0 8px 0;
}

.content-cell .result-description {
    color: #545454;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-spinner i {
    font-size: 40px;
    color: #3498db;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #7f8c8d;
    margin: 0;
    font-size: 16px;
}

/* Messages */
.error-message, .success-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.error-message {
    background: #fdeded;
    color: #e74c3c;
    border: 1px solid #fadbd8;
}

.success-message {
    background: #edf7ed;
    color: #27ae60;
    border: 1px solid #d4edda;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .keyword-position-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .results-content {
        padding: 20px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }
    
    .position-cell {
        padding: 5px;
    }
    
    .results-header {
        padding: 15px 20px;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .keyword-position-form {
        padding: 15px;
    }
    
    .results-content {
        padding: 15px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr;
        gap: 8px;
        padding: 10px;
    }
    
    .position-number {
        font-size: 16px;
    }
    
    .content-cell h5 {
        font-size: 14px;
    }
    
    .content-cell .result-description {
        font-size: 12px;
    }
}

/* Animation for smooth transitions */
.keyword-position-form,
.results-container,
.loading-spinner {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
.form-control:focus,
.btn-primary:focus,
.close-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .keyword-position-form,
    .close-btn,
    .loading-spinner {
        display: none;
    }
    
    .results-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}